Re: Retrieve specific data from MySQL

From: Date: Tue, 03 Feb 2004 03:52:19 +0000
Subject: Re: Retrieve specific data from MySQL
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-176655@lists.php.net to get a copy of this message
its not clear to me what exactly you are asking but it sounds like you would do well to read up on some MySQL syntax - specifically 'JOIN' syntax and 'ORDER BY' syntax. --- if you mean 'Smith' should match 'Smith', 'Smiths' & 'Smithson' then use the wildcard syntax (e.g.... LIKE '%Smith%' ....) shown in the previous 2 emails. Matt Hedges wrote:
Thank you for your replies... I have it showing the last name... but what I can't figure out is how for it to reference to the whole entry. So, for example, when someone enters to search for the last name "Smith," all the "Smiths" are pulled up, sorted by first name and linked by id. How do I do this? thank you very much, Hedges Now, How do I get "Matt Hedges" <m_hedges@bellsouth.net> wrote in message news:20040203031247.49690.qmail@pb1.pair.com...
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


« previous php.general (#176655) next »