For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > January 2005 > Re: [PHP-DB] help query is so slow









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] help query is so slow
Samar

2005-01-24, 3:57 pm

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@silverbackasp.com> 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
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com