Re: do table alias's work in PHP?

From: Date: Wed, 16 May 2001 22:10:47 +0000
Subject: Re: do table alias's work in PHP?
Groups: php.db 
Request: Send a blank email to php-db+get-9380@lists.php.net to get a copy of this message
you have to specify what table you are selecting each of the fields from
                        select dtype, dloc, iprice from descriptions d,
items i where d.iid = i.iid ;
should be
select d.dtype, d.dloc, i.iprice from descriptions d, items i where d.iid = i.iid ;
At 03:49 PM 5/16/01 -0500, you wrote:
My specific return is
            Couldnt execute query :
                        select dtype, dloc, iprice from descriptions d,
items i where d.iid = i.iid ; If I reduce this to
                        select dtype, dloc, iprice from descriptions d,
items where descriptions.iid = items.iid; I get the same 'Couldnt execute query :' message. As you can see the only difference is the addition of the alias 'd' for descriptions and I dont actually use it in the where clause; it's simple existance causes it to fail. Now I am using a shareware version which, perhaps, is buggy: 3.22.24-shareware-debug


« previous php.db (#9380) next »