View Single Post
Old 12-16-2012, 12:17 AM   PM User | #24
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,667
Thanks: 46
Thanked 456 Times in 444 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
I know you're concerned at the speed of development but I urge you to reconsider doing your updates in one SQL statement. Why?.. Personal experience.

When I first got into PHP / Mysql years ago I wrote the biggest and best code for my site.. but I couldn't figure out why certain pages were so frustratingly slow compared to others. I put it down to my computer (which was running the wamp setup) not being up to the job. Only when I turned on mysqls query log did I realise why it was so slow. Some pages had 200 queries running and it was grinding down the mysql server. I certainly learned a lot about sql optimization that week! That was for one user - me. Imagine that multiplied by a few thousand users and it will crash even the most powerful servers.

As for the suggestions, yes all of the suggestions put forward will allow you to do what you want. You'll need to make them fit in with your code so to speak.
__________________
Please don't be rude: Put your php code in [php][/php] tags. It is a sticky topic at the top of the forum and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is online now   Reply With Quote