Re: do table alias's work in PHP?
| From: | cameron walker | Date: | Wed, 16 May 2001 20:49:24 +0000 |
| Subject: | Re: do table alias's work in PHP? | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9371@lists.php.net to get a copy of this message | ||
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
Johannes Janson wrote:
> Hi,
>
> > The following statement will not work:
> >
> > $sql = "select * from sometable t1, sometable t2 where t1.field1 =
> > t2.field2";
>
> do you get an error? It should work.
>
> Johannes
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net