Fix sql
This commit is contained in:
parent
f64cd9d859
commit
64ca5365e7
@ -377,13 +377,13 @@ class Skilldet extends CommonObject
|
||||
if ($key == 't.rowid') {
|
||||
$sqlwhere[] = $key.'='.$value;
|
||||
} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
|
||||
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
|
||||
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
|
||||
} elseif ($key == 'customsql') {
|
||||
$sqlwhere[] = $value;
|
||||
} elseif (strpos($value, '%') === false) {
|
||||
$sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')';
|
||||
$sqlwhere[] = $key." IN (".$this->db->sanitize($this->db->escape($value)).")";
|
||||
} else {
|
||||
$sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
||||
$sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -395,7 +395,7 @@ class Skilldet extends CommonObject
|
||||
$sql .= $this->db->order($sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($limit)) {
|
||||
$sql .= ' '.$this->db->plimit($limit, $offset);
|
||||
$sql .= " ".$this->db->plimit($limit, $offset);
|
||||
}
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user