I am working on pset7. When I am trying to go to the page for register I got this fatal error: Table 'pset7.portfolio' doesn't exist in /home/jharvard/vhosts/pset7/includes/functions.php on line 152 call stack.
In general, the best way to troubleshoot the "Table doesn't exist" error is to open a new Terminal tab in the CS50 IDE and execute the following commands:
mysql50 shell SHOW DATABASES; USE pset7; SHOW TABLES; exit
Look at the names of the tables that actually exist in the MySQL database. Then compare them to the names you are using in your PHP code.
Usually, one of these cases will prove to be the cause of the error:
- the table exists, but you are not spelling its name the same way in your PHP Controller.
- the table does not exist because you have not created it yet.
- the whole database does not exist because you have not created it yet.
Hope this helps!