On Thu, 2 Aug 2001 14:57, Chris Cocuzzo wrote:
hey-
if I do this:
$query = SELECT user FROM table WHERE cat='band';
$result = mysql_query($query,$conn);
$rows = mysql_num_rows($result);
will I get something back from the $rows variable, or am I using the
mysql_num_rows() function
Yes, if your $conn is valid in the first place, and your SQL is valid.
I think 'table' is a reserved word, so as-is, it won't work.
Add some error-checking code to see what MySQL is saying about your
connection and SQL.
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
Robley [mailto:[EMAIL PROTECTED]]
Sent: August 2, 2001 2:13 PM
To: Chris Cocuzzo; [EMAIL PROTECTED]
Subject: Re: [PHP]Getting rows in a db...
On Thu, 2 Aug 2001 14:57, Chris Cocuzzo wrote:
hey-
if I do this:
$query = SELECT user FROM table WHERE cat='band';
$result = mysql_query($query,$conn
3 matches
Mail list logo