FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

search script.

 


ranzon
hi.
i want to create a search function to search thru my news in a mySQL database.. how can i make that??
avk
Let the table name be 'news' and u want to search for 'searchterm'

and the row which contains the news is 'detailNews'

here is the query



Code:
 

$query="SELECT * FROM news WHERE detailNews=%searchtem%";



I think that this might work..
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.