Silas Justiniano wrote:
Hello all! I'm performing a query that returns me hundreds of records... but I need cut them in pages that have 15 items! (using PHP) So, is it faster: select blablabal from _complex_query if (count($result) > 15) show_pages; show_only_15_rows($result); or: select count(*) from _complex_query if ($result1 > 15) show_pages; select blablabal from _complex_query LIMIT ... (see the LIMIT!) show $result
If you don't care about how many pages you'll get, try: select blablabal from _complex_query LIMIT (15+1); if (count($result) > 15) show_pages; show_only_15_rows($result); -- Alban Hertroys alban@xxxxxxxxxxxxxxxxx magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede //Showing your Vision to the World//