note 88636 deleted from function.sqlite-has-more by cmb

From: Date: Mon, 02 Nov 2020 15:00:47 +0000
Subject: note 88636 deleted from function.sqlite-has-more by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-215740@lists.php.net to get a copy of this message
Note Submitter: dcchut at gmail dot com ---- dragosmocrii at gmail dot com: It is slightly more efficient to use the COUNT function. (And when I say slightly I mean whisker small slightly.) <?php // $db is a SQLite database connection if (sqlite_single_query($db, 'SELECT COUNT(*) FROM records WHERE amount_owing > 500')) { // There are records where the amount owing exceeds $500, do some action. } else { // No money for you! } ?>

« previous php.notes (#215740) next »