Hello Ron, I guess it would really help all of us helping you in giving any real help if you post some code here. :) Regards, Samar M. = Warning: Dates in Calendar are closer than they appear. On Mon, 24 Jan 2005 23:18:33 +0800, ron <ron@xxxxxxxxxxxxxxxxx> wrote: > > Hi All, > > What seems to be the problem why my query to mysql is so slow. > > I'm using it for accounting, wherein I need to get the start time they login > and the time they logout then compute it. > > to get the start time I did select * from table where blah blah and blah blah > and blah; > > to retrieve the data I used while ($row = mysql_fetch_assoc($start_time)) { > > within that whle loop I then again did another query select * from table blah > and blah and blah to get the end time.I did it inside the while loop because > i need some data(3 columns) from my first query that acts as the primary key. > > I think that querying again to get the end time while I'm still inside the > while loop is the cause why it's to slow to display on the php page. > > I'd like to get it out from the while loop but I can't ecause I need data > from the first query, hope someone would understand this question. Thank You > > -- -- > iTouch Communications, Inc. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php