Sunday, October 9, 2016

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table doesn't exist

PHPixie database table names are plural by default(s or es added to table names). if you use PHPixie or Laravel framework and make table giving singular name as well as call it as the same name in the query then you may get the following error or warning "PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table doesn't exist". But how can you solve it. Here is an easy solution. Just give the table name as plural(like: books) and use it as singular (like: book) in your model query.

How to practice tutorials…

  • Make a team with your friends (Member should be 4/5).
  • Start to practice one tutorial series along with them.
  • Don’t try to collect source code. Type the code while watching the tutorial.
  • If you face any problem, post the question in the Forum with the error codes.
  • Share that question Link with your friends or team members to solve quickly.
  • Discuss the problem in the Forum along with others - Video Guidelines.