note 88636 added to function.sqlite-has-more

From: Date: Mon, 02 Feb 2009 00:39:47 +0000
Subject: note 88636 added to function.sqlite-has-more
Groups: php.notes 
Request: Send a blank email to php-notes+get-150080@lists.php.net to get a copy of this message
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! } ?> ---- Server IP: 117.55.229.1 Probable Submitter: 203.12.22.55 (proxied: 203.122.188.163) ---- Manual Page -- http://www.php.net/manual/en/function.sqlite-has-more.php Edit -- https://master.php.net/note/edit/88636 Del: integrated -- https://master.php.net/note/delete/88636/integrated Del: useless -- https://master.php.net/note/delete/88636/useless Del: bad code -- https://master.php.net/note/delete/88636/bad+code Del: spam -- https://master.php.net/note/delete/88636/spam Del: non-english -- https://master.php.net/note/delete/88636/non-english Del: in docs -- https://master.php.net/note/delete/88636/in+docs Del: other reasons-- https://master.php.net/note/delete/88636 Reject -- https://master.php.net/note/reject/88636 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#150080) next »