PHP MYSQL Help

Junior Spellweaver
Joined
Feb 23, 2008
Messages
131
Reaction score
1
Hey im trying to get this SQL to work what i am trying to do is display all topics with the CID that has a 2 in it the number 2 means the subcatogie so the subcatogie is 2 in the list and i want all 2 topics to display on my home page i hope this made sense i dont know how else to explain it

PHP:
$gn = mysql_query("SELECT * FROM `forum_sub_cats` WHERE `cid`=`2` DESC LIMIT 4") or die(mysql_error());

i know the code is messed up if someone could help me understand how to get it to see the 2 that would help me alot
 
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 'DESC LIMIT 4' at line 1

---------- Post added at 07:41 PM ---------- Previous post was at 07:38 PM ----------

NEVER MIND i fixed it
 
Back