Page 2 of 2
Re: Submitting more than 8000 textfields
Posted: Thu Aug 28, 2008 9:29 am
by onion2k
I'm not going to warn or ban anyone in this thread because I'm part of it and I don't want people to accuse me of abusing my mod status to settle arguments. Needlesstosay though, I have brought it to the attention of other mods, and it will be reviewed. Until then stick to the topic at hand without arguing or insulting one another please.
Re: Submitting more than 8000 textfields
Posted: Fri Aug 29, 2008 9:32 am
by emmbec
onion2k wrote:Having a huge number of fields isn't necessarily a problem...
Correct, I echoed the 8200 results and I get them in the other page without any problem (No MySQL Queries executed).
onion2k wrote:...although doing thousands of queries to process the form definitely is a problem...
Yes that was the problem, after some testing I found out that I was performing the 8200 updates, even if the evaluation did not changed, so at first I tried adding in the UPDATE statement a
"WHERE n_evaluation!=$MyNewEvaluation" but I still had the problem that I was executing the 8200 updates, soo, what I did is I queried all of the information from the DB and stored it in a PHP variable, and before the update I check if the new value is different to the stored value, if it isn't then I perform the update, otherwise I continue with the rest of the skills. This seems to work even for 11,000 records
I know that having the 8200 records is not the best option for usability, and I talked to the people who wanted the application but they want it that way, I will still try to make them change their mind.
Thanks everyone for your help!
Re: Submitting more than 8000 textfields
Posted: Fri Aug 29, 2008 12:16 pm
by Christopher
From reading this post, it sounds like they really want a web page that acts like a spreadsheet. You might want to rethink the whole form idea and move to edit-in-place using a Javascript library. That way you display all the data with one SELECT. Then you only do UPDATEs and INSERTs on the cells/rows they are actually working on. You would have fewer net database queries and they would be more spread out over time. And you'd have a much cooler interface. I recently used jQuery to do edit-in-place and it was very easy to implement.
Re: Submitting more than 8000 textfields
Posted: Fri Aug 29, 2008 12:54 pm
by emmbec
arborint wrote:You might want to rethink the whole form idea and move to edit-in-place using a Javascript library.
I have not used JQuery, I'm going to google it and see how to implement it. Thanks!