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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql_calc_found_rows

Status
Not open for further replies.

kehers

Programmer
Aug 31, 2005
56
A2
I'm trying to use sql_calc_found_rows to get the total number of results found from a sql statement that went dis way:
select high_priority sql_calc_found_rows *, match(title, comment) against ('$q') as score from dir
where match(title, comment) against ('$q') limit $somevariable, 10
and...
$numberSql = "select found_rows()";
$resultNumber = mysql_query($res_no);
funnily, what was returned was this: Resource id #5
what was wrong? Any idea a better way of going about it...i mean getting total results not considering the limit clause?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top