ThingEngineer / PHP-MySQLi-Database-Class

Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.
Other
3.3k stars 1.34k forks source link

Error inserting data #1002

Open khantry opened 2 years ago

khantry commented 2 years ago

Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /var/www/html/db/vendor/joshcam/mysqli-database-class/MysqliDb.php on line 1838

$this->_query .= ' (' . implode(', ', $dataColumns) . ') '; $this->_query .= ' (' . implode($dataColumns, ', ') . ') ';

s-vhs commented 1 year ago

Data should be inserted. This is just an error it gives for some reason. I recommend implementing a debug-mode which you can turn off in production.

RivenSkaye commented 1 year ago

This seems weird to say the least. $datacolumns is the array there, with '`, `' being the glue string. The order is already correct as it stands, which makes me wonder if the parser is having problems with the mess of backticks and single quotes