FWIW, straight from my code, with a few snips:
<?
$sql = "SELECT * FROM news ORDER BY id DESC LIMIT $limit";
$result = @mysql_query($sql);
print mysql_error();
if (!$result)
{
echo "No database found.";
}
elseif(mysql_num_rows($result) == 0)
{
echo "No records found.";
}
else
{
while($myrow = mysql_fetch_array($result))
{
//do stuff with the array $myrow
}
}
?>
Justin French
--------------
http://indent.com.au
http://soundpimps.com
http://hinge.net.au
"Ashley M. Kirchner" wrote:
>
> Rasmus Lerdorf wrote:
>
> > But did you read the documentation? It states:
>
> Yes. But, reading it, and my brain actually registering what I was reading, now
>that's a different story. :) It _is_ Friday after all. Thanks!
>
> --
> H | "Life is the art of drawing without an eraser." - John Gardner
> +--------------------------------------------------------------------
> Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
> Director of Internet Operations / SysAdmin . 800.441.3873 x130
> Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave, #6
> http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php