PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
ok yes i have searched the forums for this but couldnt find anything usefull.
i have a table with a field called title. i want to have a search function to find titles that are similar to what was entered into the search or titles that contain the keyword. i have tried
echo 'Threads Matching This Search:<br>';
$search_thread = mysql_query("SELECT * FROM threads WHERE title LIKE '%$keyword%'");
while ($result_thread = mysql_fetch_assoc($search_thread)){
echo $result_threadї'title'].'<br>';
}
echo '<br>Posts Matching This Search:<br>';
$search_post = mysql_query("SELECT * FROM posts WHERE post LIKE '%keyword%'");
while ($result_post = mysql_fetch_assoc($search_post)){
echo $result_postї'post'].'<br>';
}
the threads search works perfectly, the title is set as a varchar() but the posts search dosnt work at all. its set as text. why