Welcome Guest, Not a member yet? Register   Sign In
use of Unique in mySQL field cases Error
#21

I am trying to use this one again in MyModel:
public function insertIgnore(array $data)
{
$_prepared = array();
foreach ($data as $col => $val)
{
$_prepared[$this->db->_escape_identifiers($col)] = $this->db->escape($val);
}
$this->db->query('INSERT IGNORE INTO `exclude_choices` ('.implode(',',array_keys($_prepared)).') VALUES('.implode(',',array_values($_prepared)).');');
}

I modified $_prepared[_escape_identifiers($col)] = escape($val); to get rid of the $this->db. Now I get "call to undefined function _escape_identifiers()".

Any idea?
proof that an old dog can learn new tricks
Reply


Messages In This Thread
RE: use of Unique in mySQL field cases Error - by richb201 - 07-27-2020, 07:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB