kimla Posted November 15, 2007 Share Posted November 15, 2007 Hi. I'm getting this error (see subject), and can't seem to find out why... if($this->db->query("INSERT INTO blog VALUES('', '". $userid ."', '". $name ."', NOW()')") != true) { $this->setError("Kunne ikke opprette blogg"); return false; } else { return true; } $this->db->query is simply: public function query($var) { return $this->link->query($var); } in my db-class. Yes, I know it might be a messy way to set it up, but still, should'nt it work? All answers appreciated. Quote Link to comment Share on other sites More sharing options...
kimla Posted November 16, 2007 Author Share Posted November 16, 2007 Btw, in a bit of a hurry here... Schoolwork.. =) Quote Link to comment Share on other sites More sharing options...
teng84 Posted November 16, 2007 Share Posted November 16, 2007 school work? I guess it bad idea to do your home work Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 16, 2007 Share Posted November 16, 2007 It looks like you are returning the resource id... use the id and fetch_array_assoc or similar to get the actual results Quote Link to comment Share on other sites More sharing options...
aschk Posted November 19, 2007 Share Posted November 19, 2007 $this->db is what? a reference to itself? Because your query function is part of your class, you want to use $this->query(...) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.