object(Exception)#27 (7) { ["message":protected]=> string(674) "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and attr_value = "" order by ebs.sort asc limit 10' at line 5 SQL: select distinct(b.brand_name),b.brand_id,e.user_id from imrobotic_store.ecs_brand b left join product p on p.brand_id = b.brand_id left join enterprise e on e.brand_id = b.brand_id left join product_attr_value pav on p.id = pav.product_id left join imrobotic_store.ecs_brand_sort ebs on ebs.brand_id = b.brand_id where pav.ca_id = and attr_value = "" order by ebs.sort asc limit 10 Params: "" " ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(42) "/wwwroot/web/aio/Parith/DataSource/PDO.php" ["line":protected]=> int(635) ["trace":"Exception":private]=> array(6) { [0]=> array(6) { ["file"]=> string(42) "/wwwroot/web/aio/Parith/DataSource/PDO.php" ["line"]=> int(606) ["function"]=> string(4) "exec" ["class"]=> string(21) "Parith\DataSource\PDO" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [1]=> array(6) { ["file"]=> string(48) "/wwwroot/web/aio/JiQiRen/Database/ProductDao.php" ["line"]=> int(489) ["function"]=> string(5) "query" ["class"]=> string(21) "Parith\DataSource\PDO" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(403) "select distinct(b.brand_name),b.brand_id,e.user_id from imrobotic_store.ecs_brand b left join product p on p.brand_id = b.brand_id left join enterprise e on e.brand_id = b.brand_id left join product_attr_value pav on p.id = pav.product_id left join imrobotic_store.ecs_brand_sort ebs on ebs.brand_id = b.brand_id where pav.ca_id = and attr_value = "" order by ebs.sort asc limit 10" } } [2]=> array(6) { ["file"]=> string(50) "/wwwroot/web/aio/JiQiRen/Controller/Automation.php" ["line"]=> int(857) ["function"]=> string(15) "getProductBrand" ["class"]=> string(27) "JiQiRen\Database\ProductDao" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> NULL [1]=> int(10) } } [3]=> array(6) { ["file"]=> string(34) "/wwwroot/web/aio/Parith/Parith.php" ["line"]=> int(109) ["function"]=> string(6) "detail" ["class"]=> string(29) "JiQiRen\Controller\Automation" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [4]=> array(6) { ["file"]=> string(34) "/wwwroot/web/aio/Parith/Parith.php" ["line"]=> int(55) ["function"]=> string(3) "web" ["class"]=> string(6) "Parith" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [5]=> array(6) { ["file"]=> string(42) "/wwwroot/web/aio/wwwroot/jiqirenMobile.php" ["line"]=> int(25) ["function"]=> string(3) "run" ["class"]=> string(6) "Parith" ["type"]=> string(2) "->" ["args"]=> array(0) { } } } ["previous":"Exception":private]=> NULL }
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and attr_value = "" order by ebs.sort asc  limit 10' at line 5
SQL: select distinct(b.brand_name),b.brand_id,e.user_id from imrobotic_store.ecs_brand b 
    left join product p on p.brand_id = b.brand_id 
    left join enterprise e on e.brand_id = b.brand_id 
    left join product_attr_value pav on p.id = pav.product_id 
    left join imrobotic_store.ecs_brand_sort ebs on ebs.brand_id = b.brand_id where pav.ca_id =  and attr_value = "" order by ebs.sort asc  limit 10
Params: ""
|/wwwroot/web/aio/Parith/DataSource/PDO.php|635
Trace: 
#0 /wwwroot/web/aio/Parith/DataSource/PDO.php(606): Parith\DataSource\PDO->exec()
#1 /wwwroot/web/aio/JiQiRen/Database/ProductDao.php(489): Parith\DataSource\PDO->query('select distinct...')
#2 /wwwroot/web/aio/JiQiRen/Controller/Automation.php(857): JiQiRen\Database\ProductDao->getProductBrand(NULL, 10)
#3 /wwwroot/web/aio/Parith/Parith.php(109): JiQiRen\Controller\Automation->detail()
#4 /wwwroot/web/aio/Parith/Parith.php(55): Parith->web()
#5 /wwwroot/web/aio/wwwroot/jiqirenMobile.php(25): Parith->run()
#6 {main}