That did the trick, THANK YOU 🙂
I still have a few more criteria than needs to be compared:
AND condition LIKE '%$row[condition]%'
AND buyers_state LIKE '%$row[state]%'
$query2 = "select posting_id, vehicle_type, vehicle_make, year, buyers_city, buyers_state, condition, category, DATE_FORMAT(expiry_date, '%e-%m-%y, %h:%i %p') as e_date FROM postings WHERE vehicle_type = '$row[vehicle_make]' AND category LIKE '%$row[category]%'";
I have tried using AND multiple times but get no result, how do I correctly format this?
WHERE vehicle_type = '$row[vehicle_make]' AND category LIKE '%$row[category]%' AND conditionLIKE '%$row[condition]%' AND state LIKE '%$row[state]%'";
Example:
First row of Data in postings table
Vehicle_type= Nissan
Category= Brakes
Condition= New
State= QLD
Second row of Data in postings table
Vehicle_type= Toyota
Category= Brakes
Condition= New
State= QLD
Entry in the email alerts table
Vehicle_type= Nissan, Ford
Category= Brakes, Clutches
Condition= New
State= QLD, VIC, TAS
Using this example above...
If I ran my query that I am trying to construct the result should be only the first row in the postings table becausde the second row's vehicle type =Toyota even though it is a match on all other columns.