JakeD Posted March 25, 2007 Share Posted March 25, 2007 I would like to search a SQL database using an SQL query, i was told to use "LIKE" so i figured SELECT field FROM table LIKE $_POST['search'] but it doesnt seem to work :S, can someone please give me an example query? Thanks! Link to comment https://forums.phpfreaks.com/topic/44254-solved-sql-database-search/ Share on other sites More sharing options...
cmgmyr Posted March 25, 2007 Share Posted March 25, 2007 try "SELECT field FROM table WHERE field LIKE %".$_POST['search']."%" Link to comment https://forums.phpfreaks.com/topic/44254-solved-sql-database-search/#findComment-214937 Share on other sites More sharing options...
JakeD Posted March 25, 2007 Author Share Posted March 25, 2007 Thanks man (2nd time u've solved my problems today ) Link to comment https://forums.phpfreaks.com/topic/44254-solved-sql-database-search/#findComment-214938 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.