Jump to content

Archived

This topic is now archived and is closed to further replies.

Shadow Hatake

**solved** Need help with a query

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Change:

[code]$result = mysql_query( $query );[/code]

to:

[code]$result = mysql_query( $query ) or die(mysql_query());[/code]

Then see what the error is.

Share this post


Link to post
Share on other sites
[!--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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.