DDC-1019: Double quotation mark mysql query error on orm:convert-mapping --from-database #1271

Closed
opened 2026-01-22 13:07:54 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 7, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user rroor:

By executing this command php doctrine orm:convert-mapping --from-database yml yaml/ I get this error:

PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'BASE TABLE' in 'where clause'' in doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php:577
Stack trace:
#0 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php(577): PDO->query('SHOW FULL TABLE...')
#1 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php(532): Doctrine\DBAL\Connection->executeQuery('SHOW FULL TABLE...', Array)
#2 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(194): Doctrine\DBAL\Connection->fetchAll('SHOW FULL TABLE...')
#3 doctrine2-orm/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php(76): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableNames()
#4 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php on line 577

After var*dump the $query variable doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php on line 577 string(48) "SHOW FULL TABLES WHERE Table*type = "BASE TABLE"" you can see that BASE TABLE is in double quotations marks.
I replaced them with single quotation marks SHOW FULL TABLES WHERE Table_type = 'BASE TABLE' and executed the statement on the mysql server, no error!

Please replace the double quotation marks in the query with single quotation marks.

Originally created by @doctrinebot on GitHub (Feb 7, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user rroor: By executing this command `php doctrine orm:convert-mapping --from-database yml yaml/` I get this error: ``` PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'BASE TABLE' in 'where clause'' in doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php:577 Stack trace: #0 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php(577): PDO->query('SHOW FULL TABLE...') #1 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php(532): Doctrine\DBAL\Connection->executeQuery('SHOW FULL TABLE...', Array) #2 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(194): Doctrine\DBAL\Connection->fetchAll('SHOW FULL TABLE...') #3 doctrine2-orm/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php(76): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableNames() #4 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php on line 577 ``` After `var*dump` the `$query` variable doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php on line 577 `string(48) "SHOW FULL TABLES WHERE Table*type = "BASE TABLE""` you can see that `BASE TABLE` is in double quotations marks. I replaced them with single quotation marks `SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'` and executed the statement on the mysql server, no error! Please replace the double quotation marks in the query with single quotation marks.
admin added the Bug label 2026-01-22 13:07:54 +01:00
admin closed this issue 2026-01-22 13:07:55 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 7, 2011):

Comment created by @beberlei:

This is a duplicate of DBAL-85

@doctrinebot commented on GitHub (Feb 7, 2011): Comment created by @beberlei: This is a duplicate of DBAL-85
Author
Owner

@doctrinebot commented on GitHub (Feb 7, 2011):

Issue was closed with resolution "Duplicate"

@doctrinebot commented on GitHub (Feb 7, 2011): Issue was closed with resolution "Duplicate"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1271