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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




The main problem is that you've never explained what you want to get
from the query.  The replies have used your code as an example and I'm
pretty sure that's not what you want.  Unless I totally mis-understand
what you want, you have 2 options:

1. Use the 2 queries that I gave you in a previous post.
2. Use a subquery:

$sql = "SELECT * FROM workorders WHERE AdminID = (SELECT AdminID FROM admin WHERE UserName = '" . mysql_real_escape_string($_SESSION['user']) . "')";

3 - fix the join ;)

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux