boolean instead of array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux