• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
having issues with Error Number: 1064

Hey xiaolee, welcome to the forum.

Are you sure you are calling get_article with an id like get_article(22)? I tried to sabotage a query of mine by leaving the id empty and I got the very same SQL error.

Maybe you can add a temporarily var_dump() to your function like so:

PHP Code:
function get_article($id){
$this->db->where("article_id =".$id);

This will display the contents of $id. If there is no contents, your query will miss the id of the article you're trying to load which tells you your call to get_article is wrong.

Hope this helps!


Messages In This Thread
RE: having issues with Error Number: 1064 - by RogerMore - 06-10-2015, 07:28 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.