Re: [PHP] MySQL SELECT performance suggestions

2001-01-10 Thread Monte Ohrt
You don't need to select all the data to get the number of rows. Try this: select count(*) as total from products where $product_query; Then use total instead of num_rows. Be sure the elements in your where clause are properly indexed. [EMAIL PROTECTED] wrote: Could someone suggest some

Re: [PHP] MySQL SELECT performance suggestions

2001-01-10 Thread Christian Reiniger
On Wednesday 10 January 2001 20:58, [EMAIL PROTECTED] wrote: I have PHP perform SELECT queries on the table, and I need to display the results in a format of: "viewing $top to ($top+$depth) of $numrows found" I haven't found a way to determine $numrows without performing a second SELECT in