Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Transaction suddenly not working
I know recently the server was update from PHP 4.3.8
to 4.3.9 but that shouldn't have effected anything.

Code:

$query = "INSERT INTO table1 (ProfileID, LurkID,
ProfileName, Edu,..................."
VALUES (null,......................."

ProfileID is the PrimaryID (autoinc) - I've set the
input value to null for the auto-inc to properly work.
I assume this is correct and it did work at one time.

Then before the next query:

$LID = mysql_insert_id();

Then each subsequent query uses $LID in the subsequent
tables.

However $LID is now returning 0 and the transaction
fails.

At the end of the transaction I follow through with
this:

//resx = all the queries
if($res1 && $res2 && $res3 && $res4 && $res5 && $res6
&& res7  ) // If all results are true
{
commit();
//echo "your insertions were successful";
unset($all session variable, $LID, );

}else{

...................

Puzzling since this script was working great. We did
also upgrad MySQL from 4.0.21 to 4.0.22-standard

Thank you,
Stuart

Report this thread to moderator Post Follow-up to this message
Old Post
Stuart Felenstein
11-29-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:52 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.