note 2875 deleted from MySQL functions by danbeck
| From: | danbeck@php.net | Date: | Thu, 07 Sep 2000 14:29:35 +0000 |
| Subject: | note 2875 deleted from MySQL functions by danbeck | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4331@lists.php.net to get a copy of this message | ||
Regarding MySQL LIMIT syntax and getting the total number of results before the LIMIT: running two
queries works fine. If you have even a moderate result set (500+ rows) the PHP overhead is
definitely greater than the overhead of running two queries - just try entering them at the MySQL
prompt to see the difference! Just be sure to do the following, if possible, to keep it fast - (1)
use mysql_pconnect (2) use left joins rather than simple joins where possible on large multitable
queries (3) use 'SELECT count(*)' rather than 'SELECT count (field_name) '.