Hi Guys! Well I tried the INNER JOIN and still can not get it to echo the
AdminID so I know it isn't working, (what kind of things should I think
about that could make it not work) so far the only query that did work and
return the AdminID was my original I believe it was referred to as hosed
Terion Miller wrote:
Hi Guys! Well I tried the INNER JOIN and still can not get it to echo
the AdminID so I know it isn't working, (what kind of things should I
think about that could make it not work) so far the only query that
did work and return the AdminID was my original I believe it
Hi Again
Here is the query and code I tried:
$sql = SELECT * FROM workorders WHERE AdminID = (SELECT AdminID FROM admin
WHERE UserName = '
. mysql_real_escape_string($_SESSION['user']) . ');
$result2 = mysql_query ($sql);
$row2 = mysql_fetch_assoc ($result2);
$printrow =
Terion Miller wrote:
Hi Again
Here is the query and code I tried:
$sql = SELECT * FROM workorders WHERE AdminID = (SELECT AdminID FROM
admin WHERE UserName = '
. mysql_real_escape_string($_SESSION['user']) . ');
$result2 = mysql_query ($sql);
$row2 = mysql_fetch_assoc
Well upon looking it was number 2, I had no orders in the workorder table,
but here is an oddity I wonder if someone can explain if I run this simple
query:
$query = SELECT * FROM admin, workorders
WHERE admin.UserName = '.$_SESSION['user'].' ;
It returns adminID = 7 (my number is
Terion Miller wrote:
Well upon looking it was number 2, I had no orders in the workorder table,
but here is an oddity I wonder if someone can explain if I run this simple
query:
$query = SELECT * FROM admin, workorders
WHERE admin.UserName = '.$_SESSION['user'].' ;
It returns
Shawn McKenzie wrote:
Terion Miller wrote:
Well upon looking it was number 2, I had no orders in the workorder table,
but here is an oddity I wonder if someone can explain if I run this simple
query:
$query = SELECT * FROM admin, workorders
WHERE admin.UserName =
Shawn McKenzie wrote:
Terion Miller wrote:
Well I'm stuck I have the AdminID but now I can't seem to use it to pull
workorders with that AdminID . I couldn't get your block to work Andrew :(
I think I'm just not using it right now that I have it...lol
On Wed, Jan 28, 2009 at 2:26 PM,
On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie nos...@mckenzies.netwrote:
Shawn McKenzie wrote:
Terion Miller wrote:
Well I'm stuck I have the AdminID but now I can't seem to use it to pull
workorders with that AdminID . I couldn't get your block to work Andrew
:(
I think I'm just
Terion Miller wrote:
On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie nos...@mckenzies.netwrote:
Shawn McKenzie wrote:
Terion Miller wrote:
Well I'm stuck I have the AdminID but now I can't seem to use it to pull
workorders with that AdminID . I couldn't get your block to work Andrew
:(
I
On Wed, Jan 28, 2009 at 4:00 PM, Shawn McKenzie nos...@mckenzies.netwrote:
Terion Miller wrote:
On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie nos...@mckenzies.net
wrote:
Shawn McKenzie wrote:
Terion Miller wrote:
Well I'm stuck I have the AdminID but now I can't seem to use it to
On Wed, Jan 28, 2009 at 4:12 PM, Terion Miller webdev.ter...@gmail.comwrote:
On Wed, Jan 28, 2009 at 4:00 PM, Shawn McKenzie nos...@mckenzies.netwrote:
Terion Miller wrote:
On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie nos...@mckenzies.net
wrote:
Shawn McKenzie wrote:
Terion
Here are my variables when I reveal them, I am picking up the right
adminID I can't figure out why it's returning random orders though:
$querySELECT admin.AdminID, workorders.AdminID FROM admin,
workorders WHERE admin.UserName = 'tmiller'
$result Resource id #5
$row
key
Here are my variables when I reveal them, I am picking up the right adminID
I can't figure out why it's returning random orders though:
$querySELECT admin.AdminID, workorders.AdminID FROM admin, workorders WHERE
admin.UserName = 'tmiller'
Please please please trim your posts to relevant
I'm not sure what you mean by trim the posts, please explain so I can spare
folks from redundant text.
Your post made perfect sense to me about the INNER JOIN , I looked it up
but it is not returning the AdminID, maybe my syntax is wrong?
$query = SELECT admin.AdminID , workorders.AdminID
Terion Miller wrote:
I'm not sure what you mean by trim the posts, please explain so I can
spare folks from redundant text.
Before you post, remove any text that you're not referencing (in this
case I removed my suggestion).
Your post made perfect sense to me about the INNER JOIN , I
Your post made perfect sense to me about the INNER JOIN , I looked it up
but it is not returning the AdminID, maybe my syntax is wrong?
$query = SELECT admin.AdminID , workorders.AdminID
FROM admin
INNER JOIN
workorders
ON AdminID(admin,
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
$PerPage30
$StartPage 0
$sql
Terion Miller wrote:
Your post made perfect sense to me about the INNER JOIN , I
looked it up but it is not returning the AdminID, maybe my
syntax is wrong?
$query = SELECT admin.AdminID , workorders.AdminID
FROM admin
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
Chris wrote:
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
21 matches
Mail list logo