| 
	
 | 
 Posted by Peter van Schie on 10/14/05 01:06 
Marcel Brekelmans wrote: 
> The following code: 
>   
> $oCursor = mysql_query("SELECT ID from tblName WHERE Name='Jane'"); 
> if (!$oCursor) 
> { 
>   $bGo = false; 
> } 
> else 
> { 
>   $aRow = mysql_fetch_array($oCursor); 
> } 
>   
> results in: 
>   
> count($aRow) = 2; 
>   
> $aRow[0] = 1; 
> $aRow[1] = ''; 
 
Marcel, 
 
mysql_fetch_array by default fetches the result both as an associative  
array and a numeric array. It has two parameters, the second parameter  
is either MYSQL_ASSOC, MYSQL_NUM or MYSQL_BOTH, default is MYSQL_BOTH. 
Doing a print_r($aRow) will show this too. 
 
HTH. 
Peter. 
--  
http://www.phpforums.nl
 
  
Navigation:
[Reply to this message] 
 |