To: Jeff
Cc: mysql@lists.mysql.com
Subject: Re: Using IF in a query to set a variable then sort on said variable
2009/10/26 Jeff :
> Perhaps case is the way to go, I'll look into that this morning.
>
> Unfortunately there are three groupings. So my IF or CASE needs to check for
>
2009/10/26 Jeff :
> Perhaps case is the way to go, I'll look into that this morning.
>
> Unfortunately there are three groupings. So my IF or CASE needs to check for
> example:
>
> if timezone = 3,5,6,7 then 1
> if timezone = 1,2,4 then 2
> if timezone = 8,9 then 3
Yes, Case function is the way t
ould be. I originally wanted
to use mySQL as the part that did this processing as opposed to outputting the
results then sorting an array.
Jeff
From: 卢钧轶 [mailto:cenal...@gmail.com]
Sent: Sunday, October 25, 2009 1:19 AM
To: Jeff
Subject: Re: Using IF in a query to set a variable then sort on sai
2009/10/23 Jeff :
> I currently have a query like so:
>
> SELECT p.fldId, p.fldFName, p.fldLName, p.fldEmail, p.fldPhone, p.resellerId,
> d.timezoneId, d.bestTime, d.lastDate, d.lastTime, d.lastConnected FROM
> tblProspects as p LEFT JOIN tblProspectsDetails as d ON d.prospectId =
> p.fldId WHER
I currently have a query like so:
SELECT p.fldId, p.fldFName, p.fldLName, p.fldEmail, p.fldPhone, p.resellerId,
d.timezoneId, d.bestTime, d.lastDate, d.lastTime, d.lastConnected FROM
tblProspects as p LEFT JOIN tblProspectsDetails as d ON d.prospectId = p.fldId
WHERE p.uId = "46437" ORDER BY d.
#x27;mysql@lists.mysql.com '
Subject: re: using if in select statement
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
My boss and I were playing with using select statements, and we can
actually execute subqueries as an option if the result is true or false.
Is this expected behavior, or is it something th
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
My boss and I were playing with using select statements, and we can
actually execute subqueries as an option if the result is true or false.
Is this expected behavior, or is it something that may be fixed in a
revision, before I begin to depend on it
MAIL PROTECTED]To: <[EMAIL PROTECTED]>
om> cc:
Fax to:
Hi Keith,
I think your problem comes down to the fact that IF() is a function
that must return one value, when you put in your '*' you might be
specifying more then one value to return.
/Johan
Keith wrote:
g'day,
Am having a bit of a problem with using IF. This is the erro
g'day,
Am having a bit of a problem with using IF. This is the error message I get:
-
SELECT rac.name AS race,
IF (
el.entityType =1, ch. * , npc. *
)charData
FROM characters AS ch, entityLocation AS el, races AS rac, npc AS npc
WHERE el.entityType
IN ( 1, 10 ) AND el.containerType =
ne of user.
It's possible? Using IF clause Mysql give me an error - maybe
IF(`users`.`phone` IS '( ) - ','NOT ENTER',`users`.`phone`) AS phonefield;
What's happened?
Thanx for your time
In general, you should post your query and the error message you re
er.
It's possible? Using IF clause Mysql give me an error - maybe
IF(`users`.`phone` IS '( ) - ','NOT ENTER',`users`.`phone`) AS phonefield;
What's happened?
Thanx for your time
Diga-me e eu esquecerei
Mostre-me e lembrarei
Ensina-me e aprenderei
-
At 10:44 PM -0700 9/16/01, Robert Peters wrote:
>We developed a site using PHP and MYSQL on an online shared server.
>We used HEAP tables extensively and everything worked fine. When we
>moved the site to our dedicated server prior to launching the site,
>the queries that should create the HEAP
We developed a site using PHP and MYSQL on an online shared server. We used
HEAP tables extensively and everything worked fine. When we moved the site
to our dedicated server prior to launching the site, the queries that
should create the HEAP tables return syntax errors (when submitting the
q
We developed a site using PHP and MYSQL on an online shared server. We used
HEAP tables extensively and everything worked fine. When we moved the site
to our dedicated server prior to launching the site, the queries that
should create the HEAP tables return syntax errors (when submitting the
q
Hi!
Is it possible to use IF in the FROM part of a SELECT statement?
I've got three tables:
Profiles:
ID: int
CityID: int
Cities1:
ID: int
Name: VarChar 255
Cities2:
ID: int
Name: VarChar 255
Now I'd like to use Cities2 if the CityID in the table Profiles is
bigger than 7.
W
16 matches
Mail list logo