NYCPHP Meetup

NYPHP.org

[nycphp-talk] Mysql Selects

drydell at att.net drydell at att.net
Tue Jun 21 17:15:55 EDT 2005


I do the same... but since I'm a lazy typist, I just cut and pasted from the prior code snippet :)

Actually, I usually include debug options to display/log SQL statements and email DB errors to myself, which are built in to my DB wrapper classes - I never use native engine-specific PHP functions.

> 
> When building sql queries dynamically, I find it very useful to store 
> the query in a variable first: 
> 
> If you have problems with the query, you can easily print it. 
> 
> This also helps when you ultimately decide you want a database wrapper 
> and you're replacing mysql_query with something else - you can just do 
> a global search and replace for "mysql_query($sql)". :) 
> 
> 
> -- 
> - Adam 
> 
> ** I can fix your database problems: http://www.everylastounce.com/mysql.html ** 
> 
> Blog............... [ http://www.aquick.org/blog ] 
> Links.............. [ http://del.icio.us/fields ] 
> Photos............. [ http://www.aquick.org/photoblog ] 
> Experience......... [ http://www.adamfields.com/resume.html ] 
> Product Reviews: .. [ http://www.buyadam.com/blog ] 
> 
> _______________________________________________ 
> New York PHP Talk Mailing List 
> AMP Technology 
> Supporting Apache, MySQL and PHP 
> http://lists.nyphp.org/mailman/listinfo/talk 
> http://www.nyphp.org 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050621/802e496d/attachment.html>


More information about the talk mailing list