SELECT * 
  FROM item_categories as ic  WHERE site_id=    AND delflg=0 AND recipeflag=0    AND ( SELECT count(*) as cnt FROM items WHERE items.item_ctg_id=ic.item_ctg_id AND effective=0 ) != 0  ORDER BY item_ctg_pri,item_ctg_name 
/var/www/virtual/lib/cDb.php:119:
array(3) {
  [0] =>
  string(5) "42000"
  [1] =>
  int(1064)
  [2] =>
  string(226) "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 delflg=0 AND recipeflag=0    AND ( SELECT count(*) as cnt FROM items WHERE i' at line 2"
}
/var/www/virtual/lib/cDb.php:120:
string(495) "SQL実行エラー
SELECT * 
  FROM item_categories as ic  WHERE site_id=    AND delflg=0 AND recipeflag=0    AND ( SELECT count(*) as cnt FROM items WHERE items.item_ctg_id=ic.item_ctg_id AND effective=0 ) != 0  ORDER BY item_ctg_pri,item_ctg_name 
42000: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 delflg=0 AND recipeflag=0    AND ( SELECT count(*) as cnt FROM items WHERE i' at line 2
"
/var/www/virtual/lib/cDb.php:121:
NULL