אני מנסה לשלוף מטבלה את שדה ה-"content" בעל ה-"id" הכי גבוה.. (השורה שנוספה אחרונה לצורך העניין..). ניסיתי כך ולא עבד:
PHP קוד:
$my_query = @mysql_query("SELECT LAST(id) as content FROM mytable ORDER BY id") or die (mysql_error());
$my_fetch = @mysql_fetch_array($my_query);
echo strip_tags($my_fetch['content']);
ניסיתי גם עם:
ובשני המקרים זה החזיר לי את השגיאה:
קוד:
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 '(id) as content FROM mytable ORDER BY id' at line 1
תודה,