Re: Simple Query Question

2012-04-14 Thread Willy Mularto
Hi many thanks for the help :) On Apr 14, 2012, at 6:21 PM, Stefan Kuhn wrote: > On Saturday 14 April 2012 09:51:11 Willy Mularto wrote: >> Hi, >> Please help what is wrong with this simple query "SELECT COUNT(key_agent) >> total FROM agents_consolidated WHERE total = 180" Thanks. > You need t

Re: Simple Query Question

2012-04-14 Thread Stefan Kuhn
On Saturday 14 April 2012 09:51:11 Willy Mularto wrote: > Hi, > Please help what is wrong with this simple query "SELECT COUNT(key_agent) > total FROM agents_consolidated WHERE total = 180" Thanks. You need to use having instead of where, see the documentation. Stefan > > > > Willy Mularto > F300H

Re: Simple Query Question

2009-12-17 Thread Ian
Hi, Thanks, I just checked and it was a memcache that was caching the output. See I knew it was a simple solution ;) Thanks for the effort everyone and sorry for wasting time. Regards Ian 2009/12/17 Aleksandar Bradaric > Hi Ian, > > Why do you think something's wrong? Here is my test data and

Re: Simple Query Question

2009-12-17 Thread Aleksandar Bradaric
Hi Ian, Why do you think something's wrong? Here is my test data and the results of your query: --- mysql> SELECT * FROM wp_views; +-+-++---+ | blog_id | post_id | date | views | +-+-++---+ | 1 | 1 | 2009-12-16 |

Re: Simple query question

2004-09-20 Thread Roger Baklund
* John Mistler > I have a table in which the first column is either 1 or 0. The second > column is a number between 0 and 59. I need to perform a query > that returns > entries where: > > 1. IF the first column is 1, the second column is NOT 0 > 2. IF the first column is 0, the second column i

RE: simple query question

2002-09-13 Thread Iikka Meriläinen
Weaver, Walt [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 4:09 PM > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] > Subject: RE: simple query question > > > I'd use the InnoDB table type and establish a primary key/foreign key > relationship (parent-c

RE: simple query question

2002-09-13 Thread Meidling, Keith, CTR, OSD-C3I
I've seen a lot about 'InnoDB'. What is it? -Original Message- From: Weaver, Walt [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 4:09 PM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: simple query question I'd use the InnoDB tabl

RE: simple query question

2002-09-12 Thread Weaver, Walt
I'd use the InnoDB table type and establish a primary key/foreign key relationship (parent-child) between the two. That way referential integrity will be done for you by the database. --Walt Weaver Bozeman, Montana -Original Message- From: Chris Burger [mailto:[EMAIL PROTECTED]] Sent: