Hi - having an issue with the below code, it keeps returning this error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/timminsp/beta.freelance-creator.com/www/search/index.php on line 24 - (below is line 24, I have broken the line up to make it easier to read).
<?php $result = $GLOBALS['db']->query("SELECT p.*, c.category_name, t.title_name FROM " . $GLOBALS['config']['db']['prefix'] . "job_posts p
LEFT OUTER JOIN " . $GLOBALS['config']['db']['prefix'] . "categories c ON p.category_id = c.category_id
LEFT OUTER JOIN " . $GLOBALS['config']['db']['prefix'] . "job_titles t ON p.title = t.title_name
WHERE 1 = 1" + ($job_title != '' ? " AND p.title = '$job_title'" : '') +
($job_type != '' ? " AND p.job_type = '$job_type'" : '') +
($job_location != '' ? " AND p.job_location = '$job_location'" : '') +
($job_salary != '' ? " AND p.job_salary = '$job_salary'" : '')"
ORDER BY p.date_created DESC LIMIT " . ($page - 1) * 15 . ", 15"); ?>
I have looked through that line over and over again but cannot see the issue.
Any help would be greatly appreciated.
Thanks