Harun Günlü Harun Günlü -3 years ago 365
PHP Question

SQLSTATE[HY000]: General error: 1 no such table: user

its my first project with symfony and i tried to make a login page. i found a Tutorial (https://www.youtube.com/watch?v=3xhYwwznIWU) everything work like in the video but then i try to use "php bin/console doctrine:fixtures:load" the error :

[Doctrine\DBAL\Exception\TableNotFoundException]
An exception occurred while executing 'DELETE FROM user':
SQLSTATE[HY000]: General error: 1 no such table: user

comes.
i dont really know that i did wrong because i did everything like in the video

thx for help

Answer Source

1) You have to run command update schema:

a. php bin/console doctrine:schema:update --dump-sql // show your status database if have some changes shows

b. php bin/console doctrine:schema:update --force

2) If you use Symfony2 run command with php app/console ...

Your track trace error is saying user table is not exists.

And I suggest you to read always read error message (track trace) like that.

Doctrine\DBAL\Exception\TableNotFoundException

'DELETE FROM user': SQLSTATE[HY000]: General error: 1 no such table: user

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download