Jump to content

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 .

So on line 15 of "C:\xampp\htdocs\talkingspace\topics.php", you're trying to call a method that doesn't exist. Either you didn't include the class file, you have a typo, or something else. Since you didn't show us the code we can't really help.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.