php - 解析错误 : syntax error, 意外的 T_IF

标签 php sql joomla syntax-error

$query = "SELECT a.*, cc.name AS category, dd.ezcity AS proploc, ee.name AS statename, ff.name AS cnname, ss.dealer_name AS propseller, u.name AS editor"

. "\n FROM #__ezrealty AS a"

. "\n LEFT JOIN #__ezrealty_catg AS cc ON cc.id = a.cid"

. "\n LEFT JOIN #__ezrealty_locality AS dd ON dd.id = a.locid"

. "\n LEFT JOIN #__ezrealty_state AS ee ON ee.id = a.stid"

. "\n LEFT JOIN #__ezrealty_country AS ff ON ff.id = a.cnid"

. "\n LEFT JOIN #__ezrealty_profile AS ss ON ss.mid = a.owner"

. "\n LEFT JOIN #__users AS u ON u.id = a.checked_out"

. ( count( $where ) ? "\n WHERE " . implode( ' AND ', $where ) : "")

. if ( isset ($_POST['idSearch']) ) 

    . { " WHERE a.id = " . $_POST['idSearch']  ; }

. "\n ORDER BY ". $order

. "\n LIMIT $pageNav->limitstart, $pageNav->limit"

;

我在这里没有得到错误的语法:( , 并且它一直返回相同的错误意外 T_IF

最佳答案

去除那个 。 (点)在 if 语句之前。因为 if 语句本身不是字符串,所以您不能将其连接起来。

关于php - 解析错误 : syntax error, 意外的 T_IF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8592573/

相关文章:

javascript - 未知日期格式(7 位数字)

mysql - 我们如何从表中获取多个计数值?

php - Joomla 3.1 覆盖库

php - Joomla 不制作数据库

Joomla 3.1 - 获取事件菜单项 url

PHP get_token_all 对象类型

php - 将带有下拉菜单的文本插入数据库

php - 如何在php中注销用户?

mysql - 如何使用 laravel eloquent 从右边的 sql 中获取 5 个字符?

mysql - 如何得到正确的计数