I'm trying to optimise the number of SQL request. I've found that i've used twice the same request like that :
//a big select without limit
$select="select * from tab1, tab2 ,tab 3 where (jointure..)";
// return to me 20 line
$nbtotal=mysql_num_rows(mysql_query($select));
// I apply the limit for my paging system 5 per page
$select.=" limit ".$offset.",".$limit;
// all the information that i need to fetch
$result_of_myrequest=mysql_query($select);
I've tried count(article.id) but it return to me a big number in each count!
can i combine in the same request (with limit 0,5) the $nbtotal AND the results of my request ??
Many thanks!