I am wanting to search more than column from one database with PHP and MySQL. Currently I have this working.
This is my form:
<form action="products.php" method="POST">
Search: <input type="text" name="search" />
<input type="submit" value="submit"/>
</form>
and here is my current working query:
$query = "SELECT * FROM `GraphicsCards` WHERE `Brand` LIKE '%". $search . "%'";
$run = mysqli_query ($connection, $query);
As you can see my query is searching my database to see if the user search entered matches anything in the column "Brand".
I have other columns such as "Model" "Price" etc etc, and would like to be able to search those as well as just "Brand". Is it possible to do this is one query?
In addition I have already tried ' AND ' and ' OR ' and also ' || ' but they do not work.