Re: Excluding Data from a Query with PHP

2001-05-14 Thread Ilya Martynov


KAZ> Hi
KAZ> I've got a question on how to exclude a data from a query.  Suppose I
KAZ> have
KAZ> the following query that is being used in combination with a PHP web
KAZ> site:
KAZ> "SELECT * FROM activities WHERE month='$month' AND year='$year'"

KAZ> Now suppose the activities table looks like this:
KAZ> ID username  month dayyear
KAZ> 1  myuen Jan   01 2001
KAZ> 2  puffy May   27 2001
KAZ> 3  jlo   June  5  2001

KAZ> How do I modify the above query so it SELECTS everything EXCEPT myuen
KAZ> (that
KAZ> is, I want my result to be puffy and jlo).

"SELECT * FROM activities WHERE month='$month' AND year='$year' AND
 username!='myuen'"

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)|
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/)  |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Excluding Data from a Query with PHP

2001-05-14 Thread Roger Karnouk

SELECT * FROM activities WHERE month='$month' AND year='$year'
and username != 'myuen'

-Original Message-
From: Kelly Alexander Zia [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 1:45 PM
To: mySQL
Subject: Excluding Data from a Query with PHP


Hi

I've got a question on how to exclude a data from a query.  Suppose I
have
the following query that is being used in combination with a PHP web
site:
"SELECT * FROM activities WHERE month='$month' AND year='$year'"

Now suppose the activities table looks like this:
ID username  month dayyear
1  myuen Jan   01 2001
2  puffy May   27 2001
3  jlo   June  5  2001

How do I modify the above query so it SELECTS everything EXCEPT myuen
(that
is, I want my result to be puffy and jlo).

Thanks,

Kelly


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Excluding Data from a Query with PHP

2001-05-14 Thread Kelly Alexander Zia

Hi

I've got a question on how to exclude a data from a query.  Suppose I
have
the following query that is being used in combination with a PHP web
site:
"SELECT * FROM activities WHERE month='$month' AND year='$year'"

Now suppose the activities table looks like this:
ID username  month dayyear
1  myuen Jan   01 2001
2  puffy May   27 2001
3  jlo   June  5  2001

How do I modify the above query so it SELECTS everything EXCEPT myuen
(that
is, I want my result to be puffy and jlo).

Thanks,

Kelly


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php