Skip to content

Issue with multiple writes #402

Description

@premento

I am using this wrapper in an app made using flightphp framework. But I am getting the following error

Error:
#0 /var/www/html/inc/MysqliDb.php(1341): MysqliDb->_buildDataPairs(Array, Array, 1) #1 /var/www/html/inc/MysqliDb.php(1068): MysqliDb->_buildInsertQuery(Array) #2 /var/www/html/inc/MysqliDb.php(1037): MysqliDb->_buildQuery(NULL, Array) #3 /var/www/html/inc/MysqliDb.php(628): MysqliDb->_buildInsert('schedules_copy', Array, 'INSERT') #4 /var/www/html/index.php(1032): MysqliDb->insert('schedules_copy', Array) #5 /var/www/html/flight/core/Dispatcher.php(160): {closure}() #6 /var/www/html/flight/core/Dispatcher.php(143): flight\core\Dispatcher::callFunction(Object(Closure), Array) #7 /var/www/html/flight/Engine.php(313): flight\core\Dispatcher::execute(Object(Closure), Array) #8 /var/www/html/flight/core/Dispatcher.php(191): flight\Engine->_start() #9 /var/www/html/flight/core/Dispatcher.php(142): flight\core\Dispatcher::invokeMethod(Array, Array) #10 /var/www/html/flight/core/Dispatcher.php(48): flight\core\Dispatcher::execute(Array, Array) #11 /var/www/html/flight/Engine.php(64): flight\core\Dispatcher->run('start', Array) #12 /var/www/html/flight/core/Dispatcher.php(191): flight\Engine->__call('start', Array) #13 /var/www/html/flight/core/Dispatcher.php(191): flight\Engine->start() #14 /var/www/html/flight/Flight.php(76): flight\core\Dispatcher::invokeMethod(Array, Array) #15 /var/www/html/index.php(1253): Flight::__callStatic('start', Array) #16 /var/www/html/index.php(1253): Flight::start() #17 {main}

Code:

$serverdb = new MysqliDb ($serverdb_host, $serverdb_user, $serverdb_pass, $serverdb_name, 3306);
$serverdb2 = new MysqliDb ($serverdb_host, $serverdb_user, $serverdb_pass, $serverdb_name, 3306);
$data = Array (
'type' => $scheduletype,
'data' => $data,
'group_id' => $groupid,
'group_name' => $groupname,
'start_hh' => $starthh,
'start_mm' => $startmm,
'start_hhmm' => $starthhmm,
'end_hh' => $endhh,
'end_mm' => $endmm,
'end_hhmm' => $endhhmm,
'opwm' => $opwm,
'pwm' => $pwm,
'client' => $clientid
);

        $data2 = Array (
        'type' => $scheduletype,
        'data' => $data,
        'group_id' => $groupid,
        'group_name' => $groupname,
        'start_hh' => $starthh,
        'start_mm' => $startmm,
        'start_hhmm' => $starthhmm,
        'end_hh' => $endhh,
        'end_mm' => $endmm,
        'end_hhmm' => $endhhmm,
        'opwm' => $opwm,
        'pwm' => $pwm,
        'client' => $clientid
        );

        $id = $serverdb->insert ('schedules', $data);
        $id2 = $serverdb2->insert ('schedules_copy', $data2);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions