NYCPHP Meetup

NYPHP.org

[nycphp-talk] mysql_fetch_array question (was off-topic database...)

Chris Shiflett shiflett at php.net
Tue Aug 5 13:33:32 EDT 2003


--- joshmccormack at travelersdiary.com wrote:
>  so I have address fields, for example, that overwrite eachother. I
>  either have to make up wacky names for the database columns, or I have
>  to write out AS names for each (so using Select * is out). Now why
>  wouldn't they throw in an option so your results have table names in
>  front? So client.zip, owner.zip, etc. could all coexist? Doesn't that
>  seem reasonable?

I suppose. I bet most people in your situation either use "wacky" names such as
client_zip and owner_zip, or they alias them in the query. I see no benefit in
$foo['client.zip'] instead of $foo['client_zip'] myself. Plus, you can always
just use the enumerated array instead of the associative one.

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/



More information about the talk mailing list