That query doesn't make sense... All you are looking for is to get a
resultset containing ONLY the rows where name is John. So, just write:

SELECT ID, NAME, ADDRESS FROM users WHERE NAME='John';

By the way, in SQL, the wildcard character for regular expressions is the
'%' not '*' .

Gurhan

-----Original Message-----
From: Morten Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 4:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Wildcards


Hi,
I am trying to make a SELECT command like this:

   $qid =db_query("
   SELECT ID, NAME, ADDRESS
   FROM users
   WHERE ID=* AND NAME='John'
   ");

Is it somehow possible to have a wildcard, so it returns all records, where
the name is john and the ID is not important?

Regards,
Morten



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to