CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Is this the correct way to execute custom SQL?

Print topic Send  topic

Author Message
dpcritchley

Posts: 5
Posted: 07/21/2004, 12:29 PM

I have a couple of tables, member, member_qualifications, and mbr_dispatch_history that are all related.

So when I go to delete a member, in the Before Execute Delete Event, I have placed the following code and was wondering if it is the proper way to delete the relations before deleting the master record.

global $DBdispatch;

// Darren July 21, 2004 - make sure we delete relations as well as member
$SQL="delete from member_qaulifications where member_reference = " . CCToSQL($members->member_reference->GetValue(), ccsInteger) . "";
$DBdispatch->query($SQL);

$SQL="delete from mbr_dispatch_history where member_reference = " . CCToSQL($members->member_reference->GetValue(), ccsInteger) . "";
$DBdispatch->query($SQL);

Also I wonder if those methods are leaving the database connection open?

Thanks.
Darren
View profile  Send private message

Add new topic Subscribe to topic   


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.