[PHP] Whats the correct syntax for using query results in a new query

2009-03-03 Thread Terion Miller
I'm trying to use the AdminID that returns from query #1 in the WHERE AdminID = AdminID from Query 1 $sql= SELECT WorkOrderID, CreatedDate, Location, WorkOrderName, AdminID, FormName, Status, Notes, pod FROM `workorders` WHERE AdminID = '.$row['AdminID'].' ; that isn't working and the query

Re: [PHP] Whats the correct syntax for using query results in a new query

2009-03-03 Thread Ashley Sheridan
On Tue, 2009-03-03 at 14:09 -0600, Terion Miller wrote: I'm trying to use the AdminID that returns from query #1 in the WHERE AdminID = AdminID from Query 1 $sql= SELECT WorkOrderID, CreatedDate, Location, WorkOrderName, AdminID, FormName, Status, Notes, pod FROM `workorders` WHERE

Re: [PHP] Whats the correct syntax for using query results in a new query

2009-03-03 Thread Terion Miller
On Tue, Mar 3, 2009 at 2:20 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2009-03-03 at 14:09 -0600, Terion Miller wrote: I'm trying to use the AdminID that returns from query #1 in the WHERE AdminID = AdminID from Query 1 $sql= SELECT WorkOrderID, CreatedDate,

Re: [PHP] Whats the correct syntax for using query results in a new query

2009-03-03 Thread Dan Shirah
I'm trying to use the AdminID that returns from query #1 in the WHERE AdminID = AdminID from Query 1 Okay, I think I understand what you are trying to do. //query 1 $query1 = SELECT UserName, AdminID FROM admin WHERE Retail1 = 'YES'; $result1 = mysql_query ($query1) ; while ($row1

Re: [PHP] Whats the correct syntax for using query results in a new query

2009-03-03 Thread Ashley Sheridan
On Tue, 2009-03-03 at 14:36 -0600, Terion Miller wrote: On Tue, Mar 3, 2009 at 2:20 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2009-03-03 at 14:09 -0600, Terion Miller wrote: I'm trying to use the AdminID that returns from query #1 in the WHERE AdminID = AdminID from

Re: [PHP] Whats the correct syntax for using query results in a new query

2009-03-03 Thread Bastien Koert
On Tue, Mar 3, 2009 at 3:51 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2009-03-03 at 14:36 -0600, Terion Miller wrote: On Tue, Mar 3, 2009 at 2:20 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2009-03-03 at 14:09 -0600, Terion Miller wrote: I'm

Re: [PHP] Whats the correct syntax for using query results in a new query

2009-03-03 Thread Ashley Sheridan
On Tue, 2009-03-03 at 15:54 -0500, Bastien Koert wrote: On Tue, Mar 3, 2009 at 3:51 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2009-03-03 at 14:36 -0600, Terion Miller wrote: On Tue, Mar 3, 2009 at 2:20 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On

Re: [PHP] Whats the correct syntax for using query results in a new query

2009-03-03 Thread Terion Miller
On Tue, Mar 3, 2009 at 2:51 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2009-03-03 at 14:36 -0600, Terion Miller wrote: On Tue, Mar 3, 2009 at 2:20 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2009-03-03 at 14:09 -0600, Terion Miller wrote: I'm trying