Put this at the top of the script:
<?php error_reporting(E_ALL);?>

Also, it's possible that the browser is timing out if the script is
too slow.

Another issue is that if you are closing/reopening the 2 database
connections between steps 2 and 3, then it's probably not very
efficient.  Keeping them both open is much more efficient.

On Tue, July 25, 2006 2:39 pm, Philip Thompson wrote:
> Hi all.
>
> I have a list of people in a database who live in particular rooms.
> Next semester, they may live somewhere else, so I need to update my
> database. (I know the data becomes stale, but not that often.) Here's
> what I'm doing to update:
>
> 1. Pull list of IDs from database A - store in array
> 2. Foreach ID in array, search database B to see if they have a new
> room
>    2a. If no, go back to step 2 and go to next ID
> 3. Compare new room to current room
>    3a. If different, update the record to new room
>
> That's basically it. Now, I know this works (sorta) because the
> records are updating with the appropriate information. Here's the
> problem I'm running into: it only does a certain amount and then
> quits!! WHY!!?!
>
> The total number of records I have is 1335 - pulled from step 1.
> However, when I go through the list and query for new rooms, it
> stops... randomly... not even at the same record each time. Sometime
> it's 230, sometimes it's 476 - truly random from what I can tell. I
> am sorting the query (ORDER BY) each time, so I know it's the same
> order.
>
> Any thoughts on why this is happening? Possibly a buffer issue?
>
> Thanks in advance.
> ~Philip
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to