note 82176 deleted from function.sprintf by cmb
| From: | cmb@php.net | Date: | Sun, 02 Dec 2018 13:02:59 +0000 |
| Subject: | note 82176 deleted from function.sprintf by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-209838@lists.php.net to get a copy of this message | ||
Note Submitter: ranema at ubuntu dot polarhome dot com
----
It's very comfortible for long Sql queries:
<?php
$_gQuery = "UPDATE
x SET a = %i AND b = '%s'
WHERE my = '%s';"; // ........
mysql_query( sprintf( $_gQuery, 10, 'a', 'rrrr' ) );
?>
But if you have a short query, then it would be much faster to append your data by using
..
<?php
$_gQuery = 'SELECT COUNT(*) FROM ' . $_gName . ';';
?>