這是一個查詢我使用PHP
的MySQL這樣做是查詢線我的MySql查詢有什麼問題?
<?php
$query = "SELECT * FROM node WHERE type = 'student_report' AND uid = '{$uid}' LIMIT 1 ORDER BY created DESC";
?>
我收到以下錯誤
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 BY created DESC' at line 1
你應該在使用SQL預處理語句的習慣查詢。 – 2010-03-09 02:42:33