Re: Wildcards

From: Date: Mon, 06 May 2002 20:40:54 +0000
Subject: Re: Wildcards
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18992@lists.php.net to get a copy of this message
Morten Nielsen wrote: > $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? If you don't care about the ID, why include it? SELECT id, name, address FROM users where NAME='John' That will return all records whose NAME='John', regardless of anything else. -- W | I haven't lost my mind; it's backed up on tape somewhere. +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:ashley@pcraft.com> . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.

« previous php.db (#18992) next »