Welcome Guest, Not a member yet? Register   Sign In
Multiple db queries?
#1

[eluser]Madtrooper[/eluser]
Hey guys!

I have another newbie question for you guys!

When a user submits a form, and the data gets uploaded to the database, it's perfectly possibly to check wether the upload is completed successfully.

But what when your form needs to be uploaded to lets say 2 or more tables? You can check both queries seperately for completion, but what if the first one succeeds and the second one somehow fails? Then you're stuck with a half-uploaded form in your database, right?

How does one catch this?

Thanks in advance!
#2

[eluser]gRoberts[/eluser]
Take a look at Transactions (http://ellislab.com/codeigniter/user-gui...tions.html) Wink

Your input should not cause any issues if you validate it correctly before inserting.




Theme © iAndrew 2016 - Forum software by © MyBB