List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 15 2001 4:12am
Subject:Re: about Mysql_affected_rows
View as plain text  
At 1:50 AM -0200 11/15/01, M wrote:
>Hello, I work PHP environment. I use to call Mysql_Affected_Rows to get
>number of records retrieved by SELECT commands.
>This works fine for some scripts, but now I got a script which returns
>qtty records = -1, even I know these records exists.
>I review Mysql manual and notice this function just returns qty records
>for UPDATE, INSERT or DELETE commands, but not for SELECT commands.
>Am I making wrong?, is there some function just to retrieve qty records
>selected in a query?

mysql_num_rows() is intended for SELECT queries.  Its argument should be the
result set identifier.

>
>Thanks in advance
>
>Miguel

Thread
about Mysql_affected_rowsM15 Nov
  • Re: about Mysql_affected_rowsJohn Steele15 Nov
  • Re: about Mysql_affected_rowsPaul DuBois15 Nov
  • Re: about Mysql_affected_rowsM15 Nov