|
Posted by Gary L. Burnore on 08/07/07 20:49
On Tue, 07 Aug 2007 14:38:48 -0000, gentleJuggernaut
<url84t@gmail.com> wrote:
>On Aug 7, 10:19 am, ZeldorBlat <zeldorb...@gmail.com> wrote:
>> On Aug 7, 10:08 am, gentleJuggernaut <url...@gmail.com> wrote:
>>
>> > I have joined two tables in a SQL statement and retrieved the
>> > recordset using mysql_fetch_assoc. Now how do I refer to a field
>> > called time_stamp from table A when there is a field called
>> > time_stamp in table B. I have tried things like
>> > $row['A.time_stamp']; but it does not seem to work. Can anyone direct
>> > me to the appropriate documentation?
>>
>> > Thanks,
>>
>> > NSM
>>
>> You alias it to something else in the query itself:
>>
>> select a.timestamp as timestampA, b.timestamp as timestampB
>> from a, b
>> where a.id = b.id
>>
>> Then refer to it by its aliased name:
>>
>> $row['timestampA']
>
>thanks
& in the future, remember there's also a comp.databases.mysql :)
--
gburnore at DataBasix dot Com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
Official .sig, Accept no substitutes. | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ 0 1 7 2 3 / Ý³Þ 3 7 4 9 3 0 Û³
Black Helicopter Repair Services, Ltd.| Official Proof of Purchase
===========================================================================
Navigation:
[Reply to this message]
|