Re: Need help with a query

2006-01-23 Thread Mark Phillips
On Monday 23 January 2006 03:33 pm, Michael Stassen wrote: > Mark Phillips wrote: > > I am running mysql 4.0.24 on Debian sarge. > > > > I have a table with two columns, "team" and "division", both varchar(255). > > There are some errors in the table where division has a value but team is > > bl

Re: Need help with a query

2006-01-23 Thread Michael Stassen
Mark Phillips wrote: I am running mysql 4.0.24 on Debian sarge. I have a table with two columns, "team" and "division", both varchar(255). There are some errors in the table where division has a value but team is blank. Given that I am getting new data, and the data entry folks may create a r

Re: Need Help with a query

2005-12-12 Thread Gleb Paharenko
Hello. You may use these queries: select flight_id ,baseline*tan(radians(angle)) as attitude from flights where (baseline*tan(radians(angle))) = ( select max(baseline*tan(radians(angle))) from flights f2); +---+-

Fwd: Re: Need Help with a query

2005-12-11 Thread Mark Phillips
I forgot to copy the list as well Mark -- Forwarded Message -- Subject: Re: Need Help with a query Date: Sunday 11 December 2005 06:47 pm From: Mark Phillips <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]> Rhino, My apologies for leaving out t

Re: Need help with a query..

2005-06-16 Thread Frank Bax
At 03:09 AM 6/16/05, Cory Robin wrote: I need to speed up a search, big time. I have an application that searches for records on a date field. If it doesn't find an exact date match, it keeps searching adjacent days until it finds a certain amount of records. The problem now is, I'm using my

Re: Need help with a query..

2005-06-16 Thread Alec . Cawley
[EMAIL PROTECTED] wrote on 16/06/2005 16:29:46: > > > [EMAIL PROTECTED] wrote on 06/16/2005 11:30:10 AM: > > > Cory Robin <[EMAIL PROTECTED]> wrote on 16/06/2005 08:09:22: > > > > I need to speed up a search, big time. > > > > > > I have an application that searches for records on a date field

Re: Need help with a query..

2005-06-16 Thread SGreen
[EMAIL PROTECTED] wrote on 06/16/2005 11:30:10 AM: > Cory Robin <[EMAIL PROTECTED]> wrote on 16/06/2005 08:09:22: > > I need to speed up a search, big time. > > > > I have an application that searches for records on a date field. If it > > doesn't find an exact date match, it keeps searching ad

Re: Need help with a query..

2005-06-16 Thread Alec . Cawley
Cory Robin <[EMAIL PROTECTED]> wrote on 16/06/2005 08:09:22: > I need to speed up a search, big time. > > I have an application that searches for records on a date field. If it > doesn't find an exact date match, it keeps searching adjacent days until it > finds a certain amount of records. >

Re: need help with a query

2004-08-25 Thread Redmond Militante
awesome. thank you! [Wed, Aug 25, 2004 at 06:27:38PM -0700] This one time, at band camp, David Perron said: > > Are you assuming that all months have 30 days? You can use the same syntax > with INTERVAL 1 MONTH > I would also format the date comparison to use the same precision that the > DAT

Re: need help with a query

2004-08-25 Thread Michael Stassen
David Perron wrote: Are you assuming that all months have 30 days? You can use the same syntax with INTERVAL 1 MONTH True. I would also format the date comparison to use the same precision that the DATE_ADD function outputs. Why would you do that? The date column contains a DATE. CURDATE() retur

Re: need help with a query

2004-08-25 Thread Michael Stassen
Redmond Militante wrote: hi i need advice on a query i'm trying to do. i'm trying to find entries with that are about to expire. entries expire if their date of submission is older than 60 days. i want to find all entries with a date of submission greater than 30 days, or those that are going to

RE: need help with a query

2004-08-25 Thread David Perron
Are you assuming that all months have 30 days? You can use the same syntax with INTERVAL 1 MONTH I would also format the date comparison to use the same precision that the DATE_ADD function outputs. So, DATE_ADD(table.date, INTERVAL 1 MONTH) <= DATE_FORMAT(CURDATE(), '%Y-%m-%d') I might be off

Re: need help with a query

2004-03-25 Thread Ligaya Turmelle
sounds like you need a join. Select * from Poll, poll_votes where (Poll.poll_id = poll_votes.poll_id) and (poll_votes.user_ID = WHATEVER); But I'm still a beginner so Respectfully, Ligaya Turmelle ""Anders Gjermshus"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi. > > I'm

Re: Need help with a query

2003-12-28 Thread Roger Baklund
* Soheil Shaghaghi > Hello everyone, > I need help with MySQL coding in php please if anyone can help. I can try. :) > I have 3 tables: > -users, where the user info is stored. > -awards: contains the list of all the awards for each user > -award_types: contains different types of award > The tab

Re: Need help with a query..

2003-12-22 Thread Roger Baklund
* Aleksandar Bradaric > >> select key, desc, value > >> from your_table t1 > >> where value = (select max(value) from your_table where desc = t1.desc) > > > Anyway, when i execute this query, i get an error near 'select > > max(value)'... :( > > It's because the subselects are supported from ve

Re: Need help with a query..

2003-12-22 Thread Aleksandar Bradaric
Hi, > I have already tried the 'rtfm', but it just didn't help. But it's right there :) 3.5.2 The Row Holding the Maximum of a Certain Column > ..and I want to get this with a single query: > +-++--+ > | key | desc| value | > +-++--+ > | 2 | book|

Re: Need help with a query..

2003-12-22 Thread Chuck Gadd
Tibby wrote: ..and I want to get this with a single query: +-++--+ | key | desc| value | +-++--+ | 2 | book| 7 | | 6 | pen | 7 | +-++--+ I need to get only one row from col. DESC, the one with the highest VALUE. With

Re: Need help with a query ...

2001-11-04 Thread Anvar Hussain K.M.
Hi John Kelly, This is not a perfect solution but may be useful to you. But still with two queries! From Mysql prompt issue these two queries. SELECT @maxcat := max(Category) FROM table WHERE category = 'Sports:Football:Players' OR category = 'Sports:Football' OR category = 'Sports'; Select

Re: Need help with a query ...

2001-11-02 Thread Bob Hall
On Fri, Nov 02, 2001 at 06:15:08PM -0800, John Kelly wrote: > Hi, I have a MySQL table with a column that contains some of a web site > directory's category names in the format: > > Sports:Football:Players > > I am trying to build a query that that locates all records that match the > above cate

Re: Need help with a query ...

2001-11-02 Thread John Kelly
<[EMAIL PROTECTED]> To: "John Kelly" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, November 02, 2001 7:09 PM Subject: Re: Need help with a query ... > You need to use the LIKE command I think. The MySQL manual should give you > all the details. If you need

Re: Need help with a query ...

2001-11-02 Thread Michael
You need to use the LIKE command I think. The MySQL manual should give you all the details. If you need further help I can just write the whole query out for you. Or was the problem that you only want to worry about the if..then stuff if needed? If so could you tell what your pulling back from tha