Re: Query question about how to do a select which returns things that resemble the input

From: Date: Tue, 20 Jun 2000 09:11:16 +0000
Subject: Re: Query question about how to do a select which returns things that resemble the input
Groups: php.general 
Request: Send a blank email to php-general+get-2280@lists.php.net to get a copy of this message
Use the LIKE operator in the select statement: "select * from table where field like '%$search_string%';" (You're working with MySQL, don't you?!) HTH Steff |-------------> |(Embedded | |image moved | |to file: | |pic27394.pcx)| | | |-------------> >------------------------------------------------------------------------| |Maarten Stolte <M.Stolte@Samhoud.nl> | |20.06.2000 10:48 | >------------------------------------------------------------------------| To: "'php3@lists.php.net'" <php3@lists.php.net>, php-general@lists.php.net, php-db@lists.php.net cc: (bcc: Stephan Schoell/CHHOS/ABB) Subject: [PHP-GENERAL] Query question about how to do a select which returns things that resemble the input Security Level:? Internal Hi, I'd like to know how to return some possibilities based on a users input, e.g: The users input is "terdam", and the db returns 'rotterdam,amsterdam,tordam' How do i do this? Maarten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#2280) next »