Re: mysql/php how to retrieve the right column with 2 columns of the same name
| From: | Alberto Serra | Date: | Thu, 04 Jul 2002 10:12:19 +0000 |
| Subject: | Re: mysql/php how to retrieve the right column with 2 columns of the same name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105413@lists.php.net to get a copy of this message | ||
Wilbert Enserink wrote:
Later on in my script I'm calling the value of this column with php. $query="select * from tblA LEFT JOIN ....";it's been said over and over :) NEVER EVER write a select * query... use syntax Select a.column1, a.column2, b.column1 from tbl1 as a, tbl2 as b where ..... and you'll never get in trouble :)) Alberto Kiev -- @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@ LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......