Welcome Guest, Not a member yet? Register   Sign In
having issues with Error Number: 1064
#2

(This post was last modified: 06-10-2015, 07:34 AM by RogerMore.)

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){
var_dump($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!

-Roger
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB