$sql1 = "SELECT * FROM pages ORDER BY order ASC";
จะมีปัญหา ในการ query ดังนั้นจึง ควรใช้ แบบนี้แทน
$sql2 = "SELECT * FROM `pages` ORDER BY `order` ASC";
จะดีกว่า สามรถตัดปัญหาใน การ query ข้อมูลได้....
---------------------------------------------------------------
ปัญหาถ้าใช้ $sql1 มี error แบบนี้
Error
SQL query:
SELECT *
FROM pages
ORDER BY ORDER ASC
LIMIT 0 , 30
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'order ASCLIMIT 0, 30' at line 1
**** คำสงวล ใช้ Alt+96 เพื่อตัดปัญหา คำสงวนของ mysql