Home › Forums › Back End › Drop Down Executes Query On Post? › Reply To: Drop Down Executes Query On Post?
May 20, 2014 at 8:20 pm
#170755
Participant
BTW this is not the filter ratings script.
Ahh… useful info.
$query = mysql_query("INSERT
…
Instead of doing it all in one line, write the SQL first, and pass the variable to mysql_query
. That way, for troubleshooting, you can print the actual query that MySQL sees:
$sql = "INSERT {your sql goes here}…";
// for troubleshooting only: remove/comment out when done
exit( $sql );
$query = mysql_query( $sql );
So I’m guessing it’s a syntax error somewhere else however the query does execute and writes data into the database.
…really? That doesn’t seem right. Is there a second query anywhere in the code?