Re: simple question -Select statement and recordset

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

 



Angelo Zanetti wrote:
> it works fine because I display the no rows effected and it echo's 1.

The most common method:

$result = mysql_query("select title, abstract, keywords from Biblio where
BiblioID = " . $ID);

if (mysql_num_rows($result))
{
  while ($row = mysql_fetch_array($result))
  {
    // echo anything else in here, it will display all results
    echo ($row["title"] . "<br/>");
  }
}
else
{
  echo ("No Results Found!");
}

-- 
Matt King
magnet | internet
http://www.magnetinternet.com

-- 
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