Is this after you have done the execute and all the fetches? he value is not valid until you have porcessed all the rows returned (OK in this case none but you at least have to have tried)
Even then I'm not sure if all DBD's support it? Why not just to the standard while->fetchrow loop and count the rows yourself results guaranteed! Ken. -----Original Message----- From: Jas Grewal [mailto:[EMAIL PROTECTED]] Sent: 24 May 2002 11:45 To: [EMAIL PROTECTED] Subject: rows result on a query handle. Hi All, I am using DBD::ODBC to connect to a Informix database on a remote machine, every thing seems to be going fine. Except that when I try to get the number of rows returned by a query using the syntax bellow : if($sth->rows==0){ .... do something } The problem is that I know that the row does not exist so I would expect it to (.. do something), but it dosent. I get a value of '-1' instaed of '0'. Any ideas why im getting the '-1' value instaed of '0'???
