Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th July 2006, 19:20
badben badben is offline
Senior Member
 
Join Date: Oct 2005
Location: Lancashire, UK
Posts: 102
Thanks: 0
Thanked 1 Time in 1 Post
Default Searching a MySQL database using PHP

Does anybody out there know a tutorial or good script to search a MySQL database for keywords using PHP?

Ben
__________________
Tidy Hosting
Reply With Quote
  #2  
Old 6th July 2006, 13:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,843
Thanks: 781
Thanked 1,557 Times in 1,476 Posts
Default

There are a few PHP-MySQL tutorials here: http://www.google.com/search?q=php+m...en-US:official


I haven't tried them, but they should get you started.
http://www.freewebmasterhelp.com/tutorials/phpmysql
http://www.webmonkey.com/webmonkey/p...tutorial4.html
__________________
Falko
--
Follow me on:
Reply With Quote
  #3  
Old 26th July 2006, 05:12
Destroyer Destroyer is offline
Junior Member
 
Join Date: Jul 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not sure if you want to search one table or the whole db but here are some links that may help

http://www.devarticles.com/c/a/MySQL...-Capabilities/

http://www.tizag.com/mysqlTutorial/mysqlselect.php
Reply With Quote
  #4  
Old 20th February 2009, 08:56
AaronDavison AaronDavison is offline
Junior Member
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Cool Searching a MySQL database using PHP

Hi

Wonderful info guys....The list of apps looks great.....and i thank u..


edit reason.
Links look like spam.
Sorry if I'm wrong.

Last edited by edge; 21st February 2009 at 22:23.
Reply With Quote
  #5  
Old 21st February 2009, 22:10
Angelito Angelito is offline
Junior Member
 
Join Date: Jan 2008
Location: Los Angeles,CA (US)
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
SELECT * FROM `PRODUCT`
WHERE Enabled=1 AND
(name LIKE '%".$_GET["searchstring"]."%' OR description LIKE '%".$_GET["searchstring"]."%' OR brief_description LIKE '%".$_GET["searchstring"]."%');
It should return any record with a matching string in either specified field.

Share your results if it works for you.

Angel
Reply With Quote
  #6  
Old 20th March 2009, 10:25
hardy123 hardy123 is offline
Junior Member
 
Join Date: May 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://www.tizag.com/mysqlTutorial/-It will surely help you.
__________________
Mobile Ticketing
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 domains, 1 site wadims Installation/Configuration 13 31st May 2006 01:21
how to make php to work with mysql (php installed with apt-get, (no mysql support) grafik Installation/Configuration 3 16th May 2006 00:18
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 14th March 2006 00:58
all my site go to /var/www/ Absolusteph Installation/Configuration 14 11th March 2006 22:27
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 17:04


All times are GMT +2. The time now is 12:48.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com

Red Hat Virtual Experience - a free virtual event. Dec. 9th