Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Drop Down Executes Query On Post? Reply To: Drop Down Executes Query On Post?

#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?