Jump to content

Searching database with 2 or more keywords?


Solarpitch

Recommended Posts

Hey,

 

I am currently using the below basic sql to search a table in MySql database. It works fin when there is one keyword for example "pine" but if two keywords are entered it returns noting ... eg "pine oak". What would I need to do to get it to work if 2 or more works were entered?

 

<?php

$sql = "SELECT * FROM products where product_name LIKE '%$keyword%' ";

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.