View Single Post
Old 01-31-2008, 03:32 AM   #5 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Quote:
Originally Posted by Orc View Post
How would I assign tables/columns/etc to a different column, say I wanted to inherit some columns like so:
PHP Code:
// I want t1's users to be t2's users
$query " SELECT t1.users,t2.users FROM t1,t2
SET `table1` AS `t1` AND `table2` AS `t2`"

From your code, it looks like you might be wanting to use something like the following:
SQL Code:
SELECT
    t1.users,
    t2.users
FROM
    table1 AS t1,
    table2 AS t2
;

Please be patient when asking questions; even though some of us are on the forums very often, we're not here to drop everything and respond immediately to new posts. Even if that were the case, it does indeed take a few minutes to draft a post.
Salathe is offline  
Reply With Quote
The Following User Says Thank You to Salathe For This Useful Post:
Orc (01-31-2008)