Jump to content

How can i fix this problem


ppicasso772

Recommended Posts

ERROR

 



Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN categories ON topics.category_id = categories.id INNER ' at line 2' in C:\xampp\htdocs\talkingspace\libraries\Database.php:60 Stack trace: #0 C:\xampp\htdocs\talkingspace\libraries\Database.php(60): PDOStatement->execute() #1 C:\xampp\htdocs\talkingspace\libraries\Database.php(64): Database->execute() #2 C:\xampp\htdocs\talkingspace\libraries\Topic.php(44): Database->resultset() #3 C:\xampp\htdocs\talkingspace\topics.php(15): Topic->getByCategory('2') #4 {main} thrown in C:\xampp\htdocs\talkingspace\libraries\Database.php on line 60

 

 

Database.php

Topic.php

Link to comment
https://forums.phpfreaks.com/topic/297350-how-can-i-fix-this-problem/
Share on other sites

than it says 

 

Fatal error: Call to undefined method Topic::getByCategory() in C:\xampp\htdocs\talkingspace\topics.php on line 15

 

i m thinking i have to write sth after  $this->db->query("SELECT topics.*, categories.*, users.username, users.avatar,......here....

 

but i dont know what will i write .

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.