Here it is:
//Run a while loop to put the record ID into an array for later display
while ( $row = mysql_fetch_row($result) )
{
if ( $i == 0 )
/// RIGHT HERE YOU RE-ASSIGN RESULT TO SOMETHING ELSE :-)
$result = array( $i => $row[0] );
else
{
$tempArray = array( $i => $row[0] );
$primaryRecord = array_merge($primaryRecord
}
$i ++;
}
The second time you loop $result is no longer a valid mysql resource - it's an array.
Don't worry we've all done it.
Regards.
Main Topics
Browse All Topics





by: crackyPosted on 2004-02-18 at 21:52:31ID: 10399818
So I assmume your error catching function is not returning an error.
Just in case errorReport() is not working properly, try:
$result = mysql_query($query) or die (mysql_error());
Note that you could use die() with your function too:
$result = mysql_query($query) or die (errorReport($query));