Re: Retrieve specific data from MySQL

From: Date: Tue, 03 Feb 2004 03:22:03 +0000
Subject: Re: Retrieve specific data from MySQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-176651@lists.php.net to get a copy of this message
Matt Hedges wrote:
Hello, I have a basic question I can't figure out. My site lets people enter in their information... I now want to be able for a user to search the database. For example, enter in "firstname" or "lastname" in a text box, hit submit, and have the results returned. How do I write this in PHP? I've tried lots of twists on SELECT * FROM table WHERE lastname=$lastname... but can't get it to work... any help greatly appreciated, thanks, Hedges
How 'bout.... SELECT * FROM dbName.tableName WHERE lastname LIKE '%$lastname%' -- By-Tor.com It's all about the Rush http://www.by-tor.com

« previous php.general (#176651) next »