csv import mysql error
Posted: 12 Mar 2018, 14:08
PHP 7.0.25-0ubuntu0.16.04.1 (cli)
I tried to import a csv with products:
php artisan aimeos:jobs product/import/csv
Number of apostrophes don't match:
SELECT mpro."id" AS "product.id", mpro."siteid" AS "product.siteid",
mpro."typeid" AS "product.typeid", mpro."code" AS "product.code",
mpro."label" AS "product.label", mpro."config" AS "product.config",
mpro."start" AS "product.datestart", mpro."end" AS "product.dateend",
mpro."status" AS "product.status", mpro."ctime" AS "product.ctime",
mpro."mtime" AS "product.mtime", mpro."editor" AS "product.editor",
mpro."target" AS "product.target"
FROM "mshop_product" AS mpro
WHERE ( mpro."siteid" IN (1) AND mpro."code" IN ('{','name: \"laravel/laravel\"','description: \"The Laravel Framework.\"','keywords: [\"framework\"','license: \"MIT\"','type: \"project\"','require: {','php: \">=7.0.0\"','aimeos/aimeos-laravel: \"~2017.10\"','aimeoscom/omnipay-sofort: \"^2.3\"','fideloper/proxy: \"~3.3\"','guzzlehttp/guzzle: \"^6.3\"','laravel/framework: \"5.5.*\"','laravel/tinker: \"~1.0\"','omnipay/paypal: \"~2.0\"','symfony/event-dispatcher: \"^2.8\"',' }','require-dev: {','filp/whoops: \"~2.0\"','fzaninotto/faker: \"~1.4\"','mockery/mockery: \"~1.0\"','phpunit/phpunit: \"~6.0\"','symfony/thanks: \"^1.0\"','autoload: {','classmap: [','database/seeds','database/factories',' ]','psr-4: {','App\\\\: \"app/\"',' }','autoload-dev: {','Tests\\\\: \"tests/\"','extra: {','laravel: {','dont-discover: [',' ]','scripts: {','post-root-package-install: [','@php -r \\file_exists(\'.env\') || copy(\'.env.example\'','post-create-project-cmd: [','@php artisan key:generate','post-autoload-dump: [','Illuminate\\\\Foundation\\\\ComposerScripts::postAutoloadDump','@php artisan package:discover','post-update-cmd: [','php artisan vendor:publish --tag=public --force','php artisan migrate','config: {','preferred-install: \"dist\"','sort-packages: true','optimize-autoloader: true','}') )
GROUP BY mpro."id", mpro."siteid", mpro."typeid", mpro."code",
mpro."label", mpro."config", mpro."start", mpro."end",
mpro."status", mpro."ctime", mpro."mtime", mpro."editor",
mpro."target"
LIMIT 53 OFFSET 0
What could be the error here? if i unquote in heidisql the query works. Seems to be a problem with quoting or connection configuration.
I tried to import a csv with products:
php artisan aimeos:jobs product/import/csv
Number of apostrophes don't match:
SELECT mpro."id" AS "product.id", mpro."siteid" AS "product.siteid",
mpro."typeid" AS "product.typeid", mpro."code" AS "product.code",
mpro."label" AS "product.label", mpro."config" AS "product.config",
mpro."start" AS "product.datestart", mpro."end" AS "product.dateend",
mpro."status" AS "product.status", mpro."ctime" AS "product.ctime",
mpro."mtime" AS "product.mtime", mpro."editor" AS "product.editor",
mpro."target" AS "product.target"
FROM "mshop_product" AS mpro
WHERE ( mpro."siteid" IN (1) AND mpro."code" IN ('{','name: \"laravel/laravel\"','description: \"The Laravel Framework.\"','keywords: [\"framework\"','license: \"MIT\"','type: \"project\"','require: {','php: \">=7.0.0\"','aimeos/aimeos-laravel: \"~2017.10\"','aimeoscom/omnipay-sofort: \"^2.3\"','fideloper/proxy: \"~3.3\"','guzzlehttp/guzzle: \"^6.3\"','laravel/framework: \"5.5.*\"','laravel/tinker: \"~1.0\"','omnipay/paypal: \"~2.0\"','symfony/event-dispatcher: \"^2.8\"',' }','require-dev: {','filp/whoops: \"~2.0\"','fzaninotto/faker: \"~1.4\"','mockery/mockery: \"~1.0\"','phpunit/phpunit: \"~6.0\"','symfony/thanks: \"^1.0\"','autoload: {','classmap: [','database/seeds','database/factories',' ]','psr-4: {','App\\\\: \"app/\"',' }','autoload-dev: {','Tests\\\\: \"tests/\"','extra: {','laravel: {','dont-discover: [',' ]','scripts: {','post-root-package-install: [','@php -r \\file_exists(\'.env\') || copy(\'.env.example\'','post-create-project-cmd: [','@php artisan key:generate','post-autoload-dump: [','Illuminate\\\\Foundation\\\\ComposerScripts::postAutoloadDump','@php artisan package:discover','post-update-cmd: [','php artisan vendor:publish --tag=public --force','php artisan migrate','config: {','preferred-install: \"dist\"','sort-packages: true','optimize-autoloader: true','}') )
GROUP BY mpro."id", mpro."siteid", mpro."typeid", mpro."code",
mpro."label", mpro."config", mpro."start", mpro."end",
mpro."status", mpro."ctime", mpro."mtime", mpro."editor",
mpro."target"
LIMIT 53 OFFSET 0
What could be the error here? if i unquote in heidisql the query works. Seems to be a problem with quoting or connection configuration.