I'm looking for a script for a simple search engine that involves only 2 or three variables.
For my site I have a database table named search and 3 fields: url, title, and content.
Can someone please help me build a simple processing script for this please? I would only like the title and the content to be searched.
You could create a query like:
$prepared = $db->prepare('SELECT * FROM search WHERE title LIKE "%:search_value%" OR content LIKE "%:search_value%"');
$prepared->execute(array(':search_value' => $search_value));
$rows = $prepared->fetchAll();
Where $db is a PDO object.