[thelist] returning values you already have (was: SQL statement construction)

Warden, Matt mwarden at odyssey-design.com
Thu Oct 12 06:30:32 CDT 2000


Nope. I'm saying that you don't necessarily need to select usAuthenticate
because all records returned must have the usAuthenticate value that is
equal to int($form{'CONFIRM'})). They have to because you specified that in
the WHERE clause. So, your SQL is kind of like saying:

Select 'evolt is sexy' from myTable;

That will return 'evolt is sexy' for every row in the table... which isn't
necessary, because you already know that value, so you don't need to get it
from the database.

Am I making *any* sense? Btw, my email was more of a question that
springboarded off of yours and never got answered.

--
mattwarden
mattwarden.com

----- Original Message -----
From: Adrian Fischer <info at aussiebidder.com>
To: <thelist at lists.evolt.org>
Sent: Thursday, October 12, 2000 12:32 AM
Subject: Re: [thelist] returning values you already have (was: SQL statement
construction)


> Hi Matt,
>
> so are you saying that because I have used usAuthenticate in the WHERE
> statement that I dont need to mention it before that?  The iteration after
> WHERE is all thats required?
>
> Adrian Fischer
>
> >
>
usNum,usName,UsEmail,usPassword,usFullname,usStreet,usSuburb,usCity,usState,
> > > usZip,usPhone,usAuthenticate FROM changeConfirm  WHERE
usAuthenticate="
>  .
> > > int($form{'CONFIRM'}));
>
> <I see that he selected
> > usAuthenticate, even though that was a value he already knew, because he
> > used it to construct the WHERE clause. I assume that affects
performance,






More information about the thelist mailing list