Re: query syntax help

2004-01-20 Thread Mike Blezien
Thx's Fred... as soon as I sent the email and re-read it again... I spotted the 'as' alias table reference to the table, was actual a reserved word,..causing the error :) thx's again. -- MikeBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solu

Re: query syntax help

2004-01-20 Thread Jochem van Dieten
Mike Blezien said: > > I've been looking at this SQL query a dozen times or more, but keep > getting a syntax error message, Query: > > SELECT ai.affilid,ai.create_date,CONCAT(ai.fname,' ',ai.lname) AS > name,aw.siteid,ai.email,as.username,as.status > FROM affiliate_info ai,affiliate_signup as,aff

Re: query syntax help

2004-01-20 Thread Fred van Engen
On Tue, Jan 20, 2004 at 04:10:44PM -0600, Mike Blezien wrote: > I've been looking at this SQL query a dozen times or more, but keep getting > a syntax error message, Query: > > SELECT ai.affilid,ai.create_date,CONCAT(ai.fname,' ',ai.lname) AS > name,aw.siteid,ai.email,as.username,as.status > FRO

[Fwd: Re: Query syntax.]

2003-12-23 Thread Michael Stassen
The mysql list sent this back to me, so I'm resending. My apologies to anyone who ends up getting it twice. Data Boy wrote: Will and Michael, Thanks very much for the the replies. This works well. Is it possible to use this syntax and search for cases where they have two different kinds of equ

Re: Query syntax.

2003-12-23 Thread Michael Stassen
Data Boy wrote: Will and Michael, Thanks very much for the the replies. This works well. Is it possible to use this syntax and search for cases where they have two different kinds of equipment? Say an Ultra 5 and a HP Plotter? TIA, DB SELECT User_Account FROM Users AS a, Device_Name from Device

Re: Query syntax.

2003-12-23 Thread Data Boy
WHERE a.User_Account = b.Device_Account > AND b.Device_Name LIKE 'HP%' - Original Message - From: "Michael Stassen" <[EMAIL PROTECTED]> To: "Will Lowe" <[EMAIL PROTECTED]> Cc: "Data Boy" <[EMAIL PROTECTED]>; <[EMAIL

Re: Query syntax.

2003-12-22 Thread Michael Stassen
Will Lowe wrote: Select User_Account from Users as a, Devices as b WHERE a.User_Account = (Select DISTINCT(b.Device_Account) from b.Devices WHERE b.Device_Name LIKE 'HP%' ) I'm running 3.23.49 which I know is not the most current..it was installed 3.x does not su

Re: Query syntax.

2003-12-22 Thread Will Lowe
> Select User_Account from Users as a, Devices as b > WHERE > a.User_Account = (Select DISTINCT(b.Device_Account) from b.Devices >WHERE b.Device_Name LIKE 'HP%' ) > I'm running 3.23.49 which I know is not the most current..it was installed 3.x does not support

Re: Query syntax help?

2003-02-22 Thread Tore Bostrup
Try: SELECT FF.name AS thename, MAX(FF.label) AS thelabel, F.name AS fieldsname FROM regformfields as FF INNER JOIN regfields as F ON (FF.name = F.Name) WHERE FF.label != '' GROUP BY FF.name, F.name I don't think you can include the ORDER BY F.saveorder (anot

RE: Query syntax help

2002-03-21 Thread Daren Cotter
What you had looks fine except the date...change what you had to: AND date >= '2002-03-17'; # date needs quotes around it Should work. -Original Message- From: rory oconnor [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 8:49 AM To: mysql list (choose midget) Subject:

RE: Query syntax help

2002-03-21 Thread Roger Baklund
> I'm trying to figure out a query that will tell me the total number of > people in our house email file that physically opted out in the last > week. I'm a bit of a mysql newbie as you can tell... > > This is the general concept, though it doesn't seem to work: > > select count(id) from conta

RE: Query syntax help

2002-03-21 Thread Rick Emery
AND date >= "2002-03-17"; -Original Message- From: rory oconnor [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 10:49 AM To: mysql "list (choose midget) Subject: Query syntax help I'm trying to figure out a query that will tell me the total number of people in our house email

RE: Query syntax: multiple foreign keys

2002-01-12 Thread =James Birkholz=
Wow, our posts crossed in the mail and you suggested the same approach that I discovered independently! (Great minds think alike, right?) I'm working remotely, the server is many states away, and I don't have a local developement environment. I'm modifying the actual working site, though I try to

Re: Query syntax: multiple foreign keys

2002-01-12 Thread =James Birkholz=
I'm going re-post this query. Roger Backlund had been attempting to help me but I've either stumped him or he's busy having a life :) Besides, my first posting had several problems, since I was working from memory. Finally, in the process of preparing this query, I found a small change that

RE: Query syntax: multiple foreign keys

2002-01-12 Thread Roger Baklund
> I'm going to send direct from the programming computer, using a different > e-mail address. Ok, I reply to the list, but CC to you. Think I found your problem... > I did find that I had one invalid foreign key value in table A, but my > problem remains... > > I tried this: > > Database PosenL

RE: Query syntax: multiple foreign keys

2002-01-12 Thread Roger Baklund
* =James Birkholz= > In a message dated 1/12/02 10:48:45 AM Central Standard Time, > [EMAIL PROTECTED] writes: > ---snip--- > << SELECT A.Name, B.Name, P.ID >FROM Persons P >LEFT JOIN QualityA A USING(A_ID) >LEFT JOIN QualityB B USING(B_ID) >WHERE P.ID = thatGuy; >> > ---snip--- >

RE: Query syntax: multiple foreign keys

2002-01-12 Thread =James Birkholz=
In a message dated 1/12/02 10:48:45 AM Central Standard Time, [EMAIL PROTECTED] writes: ---snip--- << SELECT A.Name, B.Name, P.ID FROM Persons P LEFT JOIN QualityA A USING(A_ID) LEFT JOIN QualityB B USING(B_ID) WHERE P.ID = thatGuy; >> ---snip--- That doesn't work, get an error as it

Re: Query syntax: multiple foreign keys

2002-01-12 Thread DL Neil
James, > I'm new to the list, to mysql and to dynamic website programming. I'm not > new to programming, had my nose in Access97 for the last few years, off and > on. So I'm used to being coddled with sql and can't find a syntax that > works for this situation: > > (I'm using phpMyAdmin to work

Re: query syntax question

2001-11-28 Thread Benjamin Pflugmann
Hi. On Wed, Nov 28, 2001 at 02:26:45PM +0900, [EMAIL PROTECTED] wrote: > i want to do this: > > SELECT matrix.matrixId FROM matrix, language WHERE (matrix.fromLanguageId = > language.languageId AND language.isoLanguageId = 25) AND > (matrix.toLanguageId = language.languageId AND language.isoLang