CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Help with Db update

Print topic Send  topic

Author Message
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

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.