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

(06-10-2015, 07:28 AM)RogerMore Wrote: 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
thanks man, i did as you said, it did not throw that error again, instead "null" showed on the page. 
Again, Thanks
-Xiao Lee
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB