954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

wildcard search

hi
What is wild card search ? How can make it using php and mysql to search a "shop" from a mysql table which contains as follows

|Shop Name | Address | Phone Number | Details

I need to search all in this details and show the results..
Please help me ...

rajeesh_rsn
Posting Whiz in Training
265 posts since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

the wild card I think your looking for is % within the MySQL command.

so in the phrase "blue house"
so...
"%house" = TRUE;
"blue%" = TRUE;

"%blue" = FALSE;
"house%" = FALSE;

"%blue%" = TRUE;
"%house%" = TRUE;

example mysql command:

SELECT * FROM `table` WHERE `col` LIKE CONVERT( _utf8 '%blue%' USING latin1 ) COLLATE latin1_swedish_ci LIMIT 0 , 30
jrdark13
Light Poster
39 posts since Jan 2009
Reputation Points: 10
Solved Threads: 4
 

Ok please let me know how can I do this ? I had a text box in the first page and a submit button. User will enter word(s) and hit submit. Then what code I need to wrote in next page ??? My database name is "shopping_data"
Please help me ...
Thanks

rajeesh_rsn
Posting Whiz in Training
265 posts since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

I'd probably rather let you know that this tutorial seems really informative...
http://www.webreference.com/programming/php/search/

It seems like a really good tutorial.

I'm not trying to be lazy or a pain in the **** but I think you'll benefit better from the tutorial instead of giving you the answer.

Check it out and if you run into problems ask again and I'll help you out.

jrdark13
Light Poster
39 posts since Jan 2009
Reputation Points: 10
Solved Threads: 4
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You