syntax error
Posted: Tue Aug 28, 2007 11:24 am
Well, after searching around the forums a bit, I found nothing that successfully solved the problem, so hopefully posting about it will do the trick :] It seems simple enough, but I can't figure out why it won't work.
That's the line the error message specifies, saying "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 'BY Rand() LIMIT 15' at line 1"
It'd be great if someone could point out what i'm doing wrong :]
Thanks.
Code: Select all
$query = mysql_query("SELECT * FROM bmem WHERE bmid =". $_SESSION['id']. "ORDER BY Rand() LIMIT 15");It'd be great if someone could point out what i'm doing wrong :]
Thanks.