Re: mysql_fetch_assoc(): 3 is not a valid MySQL result resource

From: Date: Mon, 01 Nov 2004 02:49:18 +0000
Subject: Re: mysql_fetch_assoc(): 3 is not a valid MySQL result resource
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-200800@lists.php.net to get a copy of this message
* Thus wrote Ross Hulford: > My page displays the first result and then I get the following > error................. > > Warning: mysql_fetch_assoc(): 3 is not a valid MySQL result resource in > c:\inetpub\wwwroot\testy\Untitled-1.php on line 29 > > > > Please help. > > R. > > > my code............. > > > ... > > $Recordset1 = mysql_query($query_limit_Recordset1, $ross) or > die(mysql_error()); > ... > > mysql_free_result($Recordset1); You are freeing $Recordset1, thus making it useless. > ?> > <?php echo $totalRows_Recordset1 ?> > <?php do { ?> > <p><?php echo $row_Recordset1['location_name']; ?></p> > <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> Curt -- Quoth the Raven, "Nevermore."

« previous php.general (#200800) next »