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 = '"
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']."' ";
>
>
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:
> 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_
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 = p
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 i
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"
qu
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 querie
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 previou
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
>
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
>
>
> 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 Admi
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 looke
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
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:
$query"SELECT admin.AdminID, workorders.AdminID FROM admin, workorders WHERE
admin.UserName = 'tmiller' "
Please please please trim your posts to relevant stu
> 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:
> $query"SELECT admin.AdminID, workorders.AdminID FROM admin,
> workorders WHERE admin.UserName = 'tmiller' "
> $result "Resource id #5"
> $row
On Wed, Jan 28, 2009 at 4:12 PM, Terion Miller wrote:
>
>
> On Wed, Jan 28, 2009 at 4:00 PM, Shawn McKenzie wrote:
>
>> Terion Miller wrote:
>> > On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie > >wrote:
>> >
>> >> Shawn McKenzie wrote:
>> >>> Terion Miller wrote:
>> Well I'm stuck I have the
On Wed, Jan 28, 2009 at 4:00 PM, Shawn McKenzie wrote:
> Terion Miller wrote:
> > On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie >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
> pull
> workorders w
Terion Miller wrote:
> On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie 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 pull
workorders with that AdminID . I couldn't get your block to work Andrew
>> :(
I
On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie 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 pull
> >> workorders with that AdminID . I couldn't get your block to work Andrew
> :(
> >>
> >> I think I'm just not usi
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
> >> Because there is ambiguity w/r/t the columns you are selecting, you'll
> >> need to use aliases.
> >> http://dev.mysql.com/doc/refman/5.1/en/identifiers.html
> >> In your code, when you are referencing the column, do so using the
> >> alias. That should solve your problem.
> > I just read it
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, Andrew Ballard wro
On Wed, Jan 28, 2009 at 4:31 PM, Terion Miller wrote:
> On Wed, Jan 28, 2009 at 3:22 PM, Christoph Boget
> 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
On Wed, Jan 28, 2009 at 4:22 PM, Christoph Boget
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
>
> Because there is amb
I just read it 3 times and I don't understand it.
On Wed, Jan 28, 2009 at 3:22 PM, Christoph Boget
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
> 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
Because there is ambiguity w/r/t the columns you are selecting, you'll
need to use
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, Andrew Ballard wrote:
> On Wed, Jan 28, 2009 at 3:18
On Wed, Jan 28, 2009 at 3:18 PM, Terion Miller wrote:
> Not sure if I'm wording this right, what I am trying to do is look in two
> tables, match the ID to use to pull information
>
> Here's my code but it's not right, although it is picking up the user from
> the session, I will also post wha
Not sure if I'm wording this right, what I am trying to do is look in two
tables, match the ID to use to pull information
Here's my code but it's not right, although it is picking up the user from
the session, I will also post what my variable debugging lists:
$query = "SELECT admin.Admi
Dan...
You are the man, thanks! :-)
- Original Message -
From: "Dan Olsen" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Sent: Monday, February 26, 2001 12:30 PM
Subject: RE: [PHP] Making a variable -Trim output
>
> clayton
{
$output .= $arrayoflines[i];
}
}
youll have to debug, but it should work.
DanO
-Original Message-
From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 8:43 AM
To: Dan Olsen; [EMAIL PROTECTED]
Subject: Re: [PHP] Making a variable -Trim output
> -Original Message-
> From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 26, 2001 8:17 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Making a variable
>
>
> How can I make this a variable?
>
> ie:
>
> foreach (file("$file.txt"
Thanks!
- Original Message -
From: "Dan Olsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 26, 2001 11:39 AM
Subject: RE: [PHP] Making a variable
>
> you can concatentate the variable inside the foreach loop.
>
> foreach (fil
IL PROTECTED]]
Sent: Monday, February 26, 2001 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Making a variable
How can I make this a variable?
ie:
foreach (file("$file.txt") as $line) {
print ("" . trim(str_replace("'", "''", $line)) . "\n&
How can I make this a variable?
ie:
foreach (file("$file.txt") as $line)
{ print ("" . trim(str_replace("'", "''", $line)) .
"\n"); }
changed to:
$data = foreach (file("$file.txt") as $line)
{ print ("" . trim(str_replace("'", "''", $line)) .
"\n"); }
Simply adding the $d
36 matches
Mail list logo