boolean instead of array
| From: | John Coder | Date: | Sun, 03 Nov 2002 02:23:27 +0000 |
| Subject: | boolean instead of array | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22922@lists.php.net to get a copy of this message | ||
I seem to somehow get an boolean instead of an array from a
mysql_fetch_row function and I have no idea how.
Here's the code;
<?
<snip>
$names=mysql_query("select name from dept join picdata where dept.deptid=picdata.deptid limit
5");
print $names."<p>";
//offending query
<snip>
$resets=mysql_query("select sum(reset) from Tmp group by deptid order
by deptid limit 5");
<snip>
while($c=mysql_fetch_row($names));
{
//$a[]=$c[0]; commented out for troubleshooting
$y=gettype($c);
print $y."<P>";
}
while($e=mysql_fetch_row($resets))
{
$z=gettype($e);
print $z."<br>";
//$b[]=$e[0]; commented out for troubleshooting
}
Here's the output from a terminal:
select name from dept join picdata where picdata.deptid=dept.deptid
limit 5;
+---------------------+
| name |
+---------------------+
| BodyWatch |
| BreakThroughGallery |
| TempGallery |
| KidZone |
| Lobby |
+---------------------+
5 rows in set (0.01 sec)
here's the output from the browser:
Resource id #3
boolean
array
array
array
array
array
Any suggestions as to what I'm doing wrong?
John Coder