note 35445 modified in function.ociresult by sixd

From: Date: Thu, 08 Oct 2009 19:32:35 +0000
Subject: note 35445 modified in function.ociresult by sixd
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161563@lists.php.net to get a copy of this message
if you want to join two tables having both the same column (e.g. 'id') but you don't want to (or cannot) specify all the other fields in these two tables (like erabbott mentioned), you can use: SELECT t1.*, t2.*, t1.id AS id1, t2.id AS id2 FROM table1 t1, table2 t2; Note that this does _not_ work: SELECT *,t1.id AS id1, t2.id AS id2 FROM table1 t1, table2 t2; --was-- if you want to join two tables having both the same column (e.g. 'id') but you don't want to (or cannot) specify all the other fields in these two tables (like erabbott mentioned), you can use: SELECT t1.*, t2.*, t1.id AS id1, t2.id AS id2 FROM table1 t1, table2 t2; Note that this does _not_ work: SELECT *,t1.id AS id1, t2.id AS id2 FROM table1 t1, table2 t2; http://php.net/manual/en/function.ociresult.php

« previous php.notes (#161563) next »