Hi,
I am having trouble getting the right syntax for a query.
Basically I have a search query using LIKE, this is working the way I want it to. However, I also want to add an INNER JOIN to the query, this is where it goes wrong!
My php code for the SEARCH query which is working fine is below:
$sql = sprintf("SELECT * FROM parts WHERE (cat_id LIKE '%%%s%%') ORDER BY parts_name LIMIT $offset, $rowsperpage;", $_REQUEST["selCat"]);
This is the code for when I try to add the INNER JOIN, this part doesn't work!
$sql = sprintf("SELECT * FROM parts WHERE INNER JOIN category ON parts.cat_id = category.cat_id (cat_id LIKE '%%%s%%') ORDER BY parts_name LIMIT $offset, $rowsperpage;", $_REQUEST["selCat"]);
Please help!
Cheers 😕