Jump to content

Variable in mysql query


grantypap

Recommended Posts

As a general note, when a query doesn't work try a bit of debugging

 

1 ) put the query string into a variable so it can be echo'd if it fails

 

$sql = "delete from '$Table' where Q_ID='$Q_ID' and Ans='$Delete'";

 

2 ) when you call the query, check for errors

 

mysql_query($sql) or die (mysql_error() . "<p>$sql</p>");

Archived

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

×
×
  • Create New...

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.