Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

basic row count question

Status
Not open for further replies.

iluvperl

Programmer
Jan 22, 2006
107
I need to know how many rows are returned that satisfy my query.

Code:
      my $data = qq(SELECT search, engine, time FROM searches WHERE UNIX_TIMESTAMP(DATE_SUB(CURDATE(),INTERVAL 7 DAY)) <= UNIX_TIMESTAMP(time));

I need to know how many rows will be the result of this. The thing is, I am doing an $sth->fetch with bind_columns so I'd rather not have to do 2 separate queries if I could get away with it.

I am using Perl, and being my mysql experience is lacking I'd need an example of how to store the number in a variable.

Thank you!
 
you will probably get an answer more readily if you ask this question in the Perl forum, forum219

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top