This topic is locked

Before Delete

5/5/2007 11:54:35 PM
PHPRunner General questions
T
theo author

i want a simple syntax on how to delete a record with php runner. i have tried:

function BeforeDelete($where)

{
// Parameters:

// $where - string with WHERE clause pointing to record to be deleted.
//** Insert a record into another table ****

global $conn;

$strSQL="delete from modulescheme where ModuleCode=".$where;

db_exec($strSQL,$conn);
return true;
// return true if you like to proceed with deleting record

// return false in other case
}
but it returns error Unknown column 'module.ModuleCode' in 'where clause'

I have a table module(modulecode,modulename), modulescheme(id,modulecode,field1,field2)
Any ideas?

Sergey Kornilov admin 5/7/2007

Answered to your personal email.