Re: Trouble running a select query against a database, when I know the connection is working, and the data is there

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

 



On 4/13/2010 9:36 AM, Jacob Kruger wrote:
$qry = mysql_query($sql);
$arr = mysql_fetch_array($qry);
if ($arr.count > 0)
{
echo "<ul>";
while($row = mysql_fetch_array($arr))

You retrieve a row, check if it has any elements, then attempt to retrieve the next row, using the array you just created as the argument. You should be using $qry as the argument, but you're skipping over the first row.

  Toby

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux