[PHP-DB] Error fetching a second row from a result set (mysql)

2014-11-14 Thread Mark Murphy
Windows 7 SP1; php 5.3.29; Apache 2.4.9; MySQL 5.6.17

$isr = mysql_unbuffered_query ( $is, $link_id );
if ($isr === false) {
...
}
if ($isr) {
$booking_id = '';
while ( $isv = mysql_fetch_assoc ( $isr ) ) {
$result ['id'] = $isv ['id'];
...

Second time through this loop I get the following error:

Warning: mysql_fetch_assoc(): 40 is not a valid MySQL result resource in
C:\Users\Mark Murphy\whiworkspace\spur\cron\import_bookings.php on line 89

Problem is that for the resource, the type is changed to Unknown by a
different mysql_query within the loop. Any idea what will cause this?

When the statement works, the debug value for $isr is resource id='40'
type='mysql result'.
When the statement fails, the debug value if resource id='40' type='Unknown'


[PHP-DB] Re: Error fetching a second row from a result set (mysql)

2014-11-14 Thread Jim Giner

On 11/14/2014 1:46 PM, Mark Murphy wrote:


Problem is that for the resource, the type is changed to Unknown by a
different mysql_query within the loop. Any idea what will cause this?


Maybe show us the whole code so we can see what you are telling us?

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