You are here: Re: mysql_fetch_array and multitable queries « PHP Programming Language « IT news, forums, messages
Re: mysql_fetch_array and multitable queries

Posted by ZeldorBlat on 10/13/05 17:39

select * is fairly dangerous -- only because you don't know what you
are (or aren't getting). If you explicitly list out your columns you
can alias them and get to them that way:

SELECT v.venue_id,
v.name venue_name,
v.address1,
...
v.url,
s.name status_name
FROM venues v, status s
WHERE s.status_id = v.fk_status_id

Here I called venue.name venue_name and status.name status_name. So in
your row, you can do $row['venue_name'] and $row['status_name'].

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация