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