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.
3 Answers
Zombie Question.
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!
Did you create a new table called 'pset7.portfolio'? If not, then you are probably trying to access 'users' table.
-
If this answered your question, then please accept it as an answer to close this thread. Thanks.– rongaCommented Nov 25, 2015 at 5:08
No I did not. Now I found out where I went wrong. Because I found out that my Table name is called CS50 Portfolio. Not pset7.portfolio. Thank you very much.