RE: Using IF in a query to set a variable then sort on said variable

2009-10-26 Thread Jeff
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 >

Re: Using IF in a query to set a variable then sort on said variable

2009-10-26 Thread Jaime Crespo Rincón
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

RE: Using IF in a query to set a variable then sort on said variable

2009-10-26 Thread Jeff
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

Re: Using IF in a query to set a variable then sort on said variable

2009-10-25 Thread Jaime Crespo Rincón
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

Using IF in a query to set a variable then sort on said variable

2009-10-23 Thread 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 WHERE p.uId = "46437" ORDER BY d.

RE: using if in select statement

2005-04-29 Thread mathias fatene
#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

re: using if in select statement

2005-04-28 Thread James Black
-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

Re: Using IF

2004-06-11 Thread SGreen
MAIL PROTECTED]To: <[EMAIL PROTECTED]> om> cc: Fax to:

Re: Using IF

2004-06-11 Thread Johan Hook
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

Using IF

2004-06-10 Thread Keith
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 =

Re: Using IF clause

2004-05-31 Thread Michael Stassen
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

Using IF clause

2004-05-31 Thread ColdFusion Lists
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 -

Re: Syntax errors when creating HEAP tables and using IF NOTEXISTS

2001-09-16 Thread Paul DuBois
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

Syntax errors when creating HEAP tables and using IF NOT EXISTS

2001-09-16 Thread Robert Peters
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

Syntax errors when creating HEAP tables and using IF NOT EXISTS

2001-09-16 Thread Robert Peters
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

Using IF to select table (from part of SELECT)?

2001-07-16 Thread Alexander Skwar
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