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

Link to comment
Share on other sites

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.