CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Please help: After Update/Insert events SQL in PHP

Print topic Send  topic

Author Message
JB
Posted: 05/05/2002, 4:09 PM

Hi all!

I'm trying to update a database table so that one field is set to zero whenever a user inserts a new record, or updates an existing record. I have tried several combinations of code and event, and I'm really stuck. I need to show this working to a client tomorrow morning. I just cannot get it to work and am just learning SQL. This is the last bit of code I have to write. It should be simple. I'm sure it is simple. I'm missing it and losing it.

Any help will be incredibly appreciated. I've tried my Professional support from CC, and no luck. I haven't heard back from anyone since I posted my request yesterday afternoon.

Here's what I've worked out, but it's not working. I know I am so close, but I can't get it working. This is unbelievably frustrating. Can anyone lend some advice?

For a 'Contacts' record:
After Update:
$sSQL = "update Contacts set " . "ContactApproved=" . tosql("0", "Number");
$sSQL .= " where " . $sWhere;

After Insert:
$mSQL = "insert into Contacts (ContactApproved) values ("0");

For a Member Roster record:
After Update:
$sSQL = "update LINRoster set " . "Approved=" . tosql("0", "Number");
$sSQL .= " where " . $sWhere;

Again, any assistance will be greatly appreciated. Help??!

THANKS!

John
jblood@beholdlearning.com
Alex Alexapolsky
Posted: 05/06/2002, 2:13 AM

You've been answered in the support system.

   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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