Klance Posted April 14, 2008 Share Posted April 14, 2008 I'm getting this error: Error in query: SELECT MAX(score) FROM GH80 WHERE console = 'PS2' AND diff = 'Expert' AND song = 'Ain't Nothin But A Good Time'. You have an error in your SQL syntax near 't Nothin But A Good Time'' at line 1 Here is the code i'm using: <tr> <td><center><?php (include "PreSong.inc"); ?>&song=Ain't Nothin But A Good Time">Ain't Nothin But A Good Time</a></td></center> <td> <?php $query = "SELECT MAX(score) FROM $game WHERE console = '$console' AND diff = '$diff' AND song = 'Ain't Nothin But A Good Time'"; $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); echo mysql_result($result, 0); ?> </td> </tr> Quote Link to comment Share on other sites More sharing options...
rondog Posted April 14, 2008 Share Posted April 14, 2008 try: "SELECT MAX(score) FROM $game WHERE console = '$console' AND diff = '$diff' AND song = 'Ain\'t Nothin But A Good Time'"; the ' in you song name is throwing it off Quote Link to comment Share on other sites More sharing options...
Klance Posted April 14, 2008 Author Share Posted April 14, 2008 try: "SELECT MAX(score) FROM $game WHERE console = '$console' AND diff = '$diff' AND song = 'Ain\'t Nothin But A Good Time'"; the ' in you song name is throwing it off Thank you Quote Link to comment 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.