Re: Making a Variable from different tables with Matching Dbfields?

From: Date: Wed, 28 Jan 2009 23:44:01 +0000
Subject: Re: Making a Variable from different tables with Matching Dbfields?
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-287344@lists.php.net to get a copy of this message
Well I tried both ways and still cannot get it to pick up the AdminID, $query "SELECT admin.AdminID , workorders.AdminID FROM admin INNER JOIN workorders on AdminID WHERE admin.UserName = 'tmiller' " $result "" $row "" $SortBy "WorkOrderID DESC" $Page "1" $PerPage "30" $StartPage "0" $sql "SELECT admin.AdminID , workorders.AdminID FROM admin INNER JOIN workorders ON AdminID(admin, workorders) WHERE admin.UserName = 'tmiller' " $Total "0"
That is not the right syntax still. It needs to be: select admin.AdminID, workorers.AdminID from admin inner join workorders using (AdminID) WHERE admin.userName='tmiller'; or select admin.AdminID, workorers.AdminID from admin inner join workorders ON (admin.AdminID=workorders.AdminID) WHERE admin.userName='tmiller'; -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#287344) next »