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

 Delete user but get the user_id first. (Solution)

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 10/06/2008, 8:49 AM

I have an editable grid with the users data: I want to get the user_id from the row that is to be deleted. I will use this to delete data in other tables with this users id. Any pointers?

Also, I presume that this will only work when a single user is selected for deletion. Is there any way to allow only single Delete Checkboxes to be selected?

Trevor
View profile  Send private message
saseow

Posts: 744
Posted: 10/07/2008, 12:42 AM

In case anyone else has a similar hassle. I suggest using contraints as it is by far the most simple solution to implement
I have tried:

CCS: Had problems getting the user_id from the deleted record.

Triggers: Only one delete allowed in a delete event. I used OLD.ID and it worked for a single table.

Finally I settled on MySQL constraints and it all works fine.

Trevor
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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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