Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

no comments table #3

Open
mrlolklo opened this issue Aug 18, 2023 · 2 comments
Open

no comments table #3

mrlolklo opened this issue Aug 18, 2023 · 2 comments

Comments

@mrlolklo
Copy link

Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'videotube.comments' doesn't exist in C:\xampp\htdocs\includes\classes\Video.php:231 Stack trace: #0 C:\xampp\htdocs\includes\classes\Video.php(231): PDOStatement->execute() #1 C:\xampp\htdocs\includes\classes\CommentSection.php(20): Video->getNumOfComments() #2 C:\xampp\htdocs\includes\classes\CommentSection.php(16): commentSection->createCommentSection() #3 C:\xampp\htdocs\watch.php(33): commentSection->create() #4 {main} thrown in C:\xampp\htdocs\includes\classes\Video.php on line 231

@menj
Copy link

menj commented Oct 22, 2023

The error is being thrown because the comments table does not exist in the videotube database. Here are some steps you can take to resolve this issue:

Check Database Schema: Make sure that the comments table actually exists in the videotube database. You can do this by logging into your database management tool (like phpMyAdmin) and checking the list of tables.

Check SQL Query: Look at the SQL query on line 231 of Video.php file and make sure it is correct. If the table name is misspelled or if there's any other error in the query, that could be causing the issue.

Create Table: If the comments table doesn't exist, you'll need to create it. You should find the SQL schema for your application and run the necessary SQL commands to create the comments table with the correct structure.

Once you've taken these steps, the error should be resolved. If you're still seeing the error, you may need to review your application's code and database schema to make sure everything is set up correctly.

@koubaki
Copy link

koubaki commented Jul 3, 2024

The error is being thrown because the comments table does not exist in the videotube database. Here are some steps you can take to resolve this issue:

Check Database Schema: Make sure that the comments table actually exists in the videotube database. You can do this by logging into your database management tool (like phpMyAdmin) and checking the list of tables.

Check SQL Query: Look at the SQL query on line 231 of Video.php file and make sure it is correct. If the table name is misspelled or if there's any other error in the query, that could be causing the issue.

Create Table: If the comments table doesn't exist, you'll need to create it. You should find the SQL schema for your application and run the necessary SQL commands to create the comments table with the correct structure.

Once you've taken these steps, the error should be resolved. If you're still seeing the error, you may need to review your application's code and database schema to make sure everything is set up correctly.

An AI answer

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants