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! Quote 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']."%" Quote 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 ) Quote Link to comment https://forums.phpfreaks.com/topic/44254-solved-sql-database-search/#findComment-214938 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.