[4] ErrorException in 93b45309d4928fde1db96d63663cda94.php line 515

语法错误: unexpected ')'

  1. if ($_sql != -1) {
  2. //拼接SQL语句
  3. $_db = db('diyfield');
  4. $_sqlstrlist = explode(" ", $_sql);
  5. $_sqlstr = ' ';
  6. if ($_sqlstrlist) {
  7. foreach ($_sqlstrlist as $key1 => $value1) {
  8. if (is_numeric($value1)) {
  9. $_fieldname = $_db->where(['id'=>$value1])->value('field');
  10. if ($_GET[$_fieldname] != '不限' && $_GET[$_fieldname] != '') {
  11. $_filelist = explode(',', $_GET[$_fieldname]);
  12. $_instr = "";
  13. foreach ($_filelist as $key2 => $value2) {
  14. if ($value2) {
  15. $_instr = $_instr ? $_instr." OR ($_fieldname LIKE '%".$value2."%')" : "($_fieldname LIKE '%".$value2."%')";
  16. }
  17. }