Page 1 of 1

Weird error

Posted: Wed Dec 28, 2005 11:36 pm
by jaymoore_299
I have a whole bunch of mysql queries on this one php page. If I load this page multiple times rapidly then the queries for each page get messed up so that the results are unexpected. Anyone know a way around this?

Posted: Wed Dec 28, 2005 11:43 pm
by Charles256
well one brute force way of doing it is locking tables,now I'm not entirely sure it's the recommended way but here's a brief tutorial on how to do it.. http://www.faqts.com/knowledge_base/vie ... 537/fid/13 that makes sure each script executes before the next person can do anything (can't modify a locked table;) ) perhaps throw a real friendly error message telling them to refresh the page in five seconds? or have it auto refresh in five? I'll leave that up to you.