Re: Status of mysql_db_query()
| From: | Zeev Suraski | Date: | Sat, 24 Aug 2002 14:39:05 +0000 |
| Subject: | Re: Status of mysql_db_query() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87414@lists.php.net to get a copy of this message | ||
At 17:25 24/08/2002, Melvyn Sopacua wrote:
At 15:42 24-8-2002, Zeev Suraski wrote:No, mysql() is bad because the name doesn't give you the faintest clue about what it does... That's why mysql_db_query() was introduced to begin with, and that is why mysql() was documented as 'deprecated' from the very beginning of PHP 3...Can anybody explain the reasoning for deprecating it? Other than breaking tons of sites, I don't see any advantage to it. Even for efficiency junkies, mysql_db_query() is significantly more efficient than the mysql_select_db() and mysql_query() combo, if you only make a single query on a page (which accounts for a great deal of the pages in my experience).And what about mysql() - same deprecation.
FWIW - I've already moved all the mysql_db_query stuff outof our sites and the main advantage being debugability: <?php ... mysql_db_query("other_db","query",$conn); //various includes later mysql_query($sql, $conn); ?> error: no such table Whether that's reason for deprecation, is questionable.I don't think it is. Replace mysql_db_query() with mysql_select_db() and you're left off with the same issue... Zeev