I have got data in as key => value in large array . (20K items). Now I am trying to achieve this : say in $employees
INSERT INTO employees (id, First, Last) VALUES ('Jayesh', 'Singh'), ('John', 'Gardner'), ('Mohd', 'Tarreq'), ('Robert', 'Smith');
How can I do this in phalcon more natively ?
I tried raw sql , build sql query from array giving above but on executing using :
$success = $this->di->getShared('db')->execute($query);
Now it is seeing first value as column Name, showing error :
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Jayesh' in 'field list' #0 [internal function]: PDO->exec('INSERT INTO `em...')
Also, what is the best way to achieve this wehre I can also sanitize each element properly ?