Delete statement not accepting variable

admin

Administrator
Staff member
I am trying to delete an entry from a a mysql database using:

$deleteStmt = "DELETE from $tableName where sop_id = '%$sop_id%'" ;

I also tried 'where sop_id = "$sop_id' and it didn't work.

The variable should be passed to the query using this line of code:

<A HREF=http://www.phpbuilder.com/board/archive/index.php/\"delete.php?sop_id=%s">Delete</A></TD>

It doesn't seem to be picking up the variable.

Any ideas would be greatly appreciated.
 
Back
Top