![]() |
Alexey admin 3/19/2007 |
Hi, delete from tablename where finished='Yes' |
M
|
mord3th author 3/19/2007 |
thats what im am using but i get the error mysql_query(): supplied argument is not a valid MySQL-Link resource
global ($conn, $strTableName)
|
J
|
Jane 3/20/2007 |
There are some syntax errors in your code. global $conn, $strTableName; $strInsert="INSERT INTO finished (id, name, phone, email) VALUES (".$values["id"].",'".$values["name"]."','".$values["phone"]."','".$values["email"]."') WHERE finished='Yes'"; $strDelete="DELETE FROM ".$strTableName." WHERE finished='Yes'"; db_exec($strInsert, $conn); db_exec($strDelete, $conn); |
M
|
mord3th author 3/21/2007 |
There are some syntax errors in your code. I suppose you use this code in the Before record updated event. In this case you can use $values array with all field values of edited record.
|
M
|
mord3th author 3/21/2007 |
well i ended up tweaking it abit and heres what i got global $conn, $strTableName;
|
![]() |
Alexey admin 3/22/2007 |
Hi, `update` instead of just update |
M
|
mord3th author 3/22/2007 |
that did the trick |