Trevor
|
| Posted: 06/09/2002, 8:51 PM |
|
I have a form where two of the fields are 'completed' and 'task_id'. In the Before Show Insert event, I want to update a table called 'tasks' if the field 'completed' is equal to 1. This is the code I am using and it is not working. Any ideas?
if ($fldcompleted == 1)
$sSQL = "UPDATE tasks SET tasks.completed = 1 WHERE tasks.task_id = " .$fldtask_id;
$db->query($sSQL);
Thanks,
Trevor
|
|
|
 |
Nicole
|
| Posted: 06/11/2002, 6:43 AM |
|
Trevor,
please try this one:
if ($fldcompleted == '1')
{
$sSQLu = "UPDATE tasks SET tasks.completed = 1 WHERE tasks.task_id = " .$fldtask_id;
$db->query($sSQLu);
}
You can print query and test it against db for testing purposes
|
|
|
 |
|