Closed premento closed 8 years ago
Apache error log file says "Wrong Operation" which is a status coming from 'PHP-MySQLi-Database-Class'
I think, you're trying to pass an array in one of your variables instead of scalar type. Execute:
var_dump($scheduletype, $data, $groupid, $groupname, $starthh, $startmm, $starthhmm, $endhh,
$endmm, $endhhmm, $opwm, $pwm, $clientid);
to check whether it's true or not.
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 );