Shadow Hatake Posted March 17, 2006 Share Posted March 17, 2006 Okay, so for a spanish extra credit project our spanish teacher asked us to create a jeaprody game. Well I decided to make mine web based and allow it to store multiple games and reuse them. Now here's my problem. I've got a query but it doesn't work. Can anyone tell what wrong with it?Due tot he size of the query I'm posting the code on another page:[a href=\"http://www.infected-designs.com/jeoprody/query.htm\" target=\"_blank\"]http://www.infected-designs.com/jeoprody/query.htm[/a] Quote Link to comment https://forums.phpfreaks.com/topic/5124-solved-need-help-with-a-query/ Share on other sites More sharing options...
hitman6003 Posted March 17, 2006 Share Posted March 17, 2006 Change:[code]$result = mysql_query( $query );[/code]to:[code]$result = mysql_query( $query ) or die(mysql_query());[/code]Then see what the error is. Quote Link to comment https://forums.phpfreaks.com/topic/5124-solved-need-help-with-a-query/#findComment-18178 Share on other sites More sharing options...
Shadow Hatake Posted March 17, 2006 Author Share Posted March 17, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]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 ''boardname' , 'retrievalname' , 'cat1_name' , 'cat1_q1' , 'cat1_a1' , 'cat1_q2' ' at line 1[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/5124-solved-need-help-with-a-query/#findComment-18185 Share on other sites More sharing options...
hitman6003 Posted March 17, 2006 Share Posted March 17, 2006 Don't use the single quotes around your column names. Either don't use anything and just seperate them by commas, or use backtics (`)...the one above tab on most keyboards. Quote Link to comment https://forums.phpfreaks.com/topic/5124-solved-need-help-with-a-query/#findComment-18186 Share on other sites More sharing options...
Shadow Hatake Posted March 17, 2006 Author Share Posted March 17, 2006 Sweet it worked thanks. ^^ Quote Link to comment https://forums.phpfreaks.com/topic/5124-solved-need-help-with-a-query/#findComment-18191 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.