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?
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?