I've this coding that works fine on localhost. But in my website it doesnt, and I guess its due do MARIADB version 10.1.24
Here's the code:
$search1 = @$_GET['valuelo'];
$search2 = @$_GET['valuear'];
$search3 = @$_GET['valueco'];
$search4 = @$_GET['valuero'];
$search5 = @$_GET['valuefl'];
$search6 = @$_GET['valuelu'];
$search7 = @$_GET['valuetr'];
$search8 = @$_GET['valuepo'];
$sql = "SELECT * FROM location, area, condition, rooms, floor, luxury, trendy, pool
WHERE 'location' LIKE '%$search1%'
AND 'area' LIKE '%$search2%'
AND 'condition' LIKE '%$search3%'
AND 'rooms' LIKE '%$search4%'
AND 'floor' LIKE '%$search5%'
AND 'luxury' LIKE '%$search6%'
AND 'trendy' LIKE '%$search7%'
AND 'pool' LIKE '%$search8%'";
Here's the error:
ERROR: Could not able to execute
SELECT *
FROM location, area, condition, rooms, floor, luxury, trendy,
pool
WHERE locationbw LIKE '%%'
AND area LIKE '%%'
AND condition LIKE '%%'
AND rooms LIKE '%%'
AND floor LIKE '%%'
AND luxury LIKE '%%'
AND trendy LIKE '%%'
AND pool LIKE '%%'
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'condition, rooms, floor, luxury, trendy, pool WHERE locationbw LIKE '%%' ' at line 1
Please help me! I see everything right