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

"Jacob Kruger" <[email protected]>
Newsgroups gmane.comp.php.windows
Message-ID <010d01cadaf8$752f2910$6401a8c0@rwilco>
Yup, figured that one out as well.

Thanks

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

----- Original Message ----- 
From: "Toby Hart Dyke" <[email protected]>
To: "Jacob Kruger" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, April 13, 2010 12:00 PM
Subject: Re: [PHP-WIN] Trouble running a select query against a database, 
when I know the connection is working, and the data is there


> 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
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus 
> signature database 5024 (20100413) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
> 


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5024 (20100413) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.