HI There ,
I am writing migration script from one MySQL database to other MySQL DB using CLI task in phalcon .
**What i am doing : **
I am fetching records from one DB using below code
$connection = new Phalcon\Db\Adapter\Pdo\Mysql((array) $this->config->db1_database);
$connection->connect();
$sqlPF = "SELECT actual FROM " . $dbPHPF . "user WHERE var_name = 'split'";
$users = $connection->fetchAll($sqlPF, Phalcon\Db::FETCH_ASSOC);
Using this queri i am getting records set . after that I am tring to inser all those records using phalcon model
foreach ($users as $user)
{
$obj = new \Socialveo\Core\Models\User();
$obj->save($user);
}
Problem : I am not getting success to insert single records .
Please help me thanks