[eluser]earlyriser[/eluser]
Now I got:
PHP Fatal error: Call to a member function on a non-object in /home/.../controllers/wine.php on line 49
whit the code
Code:
function comment_insert()
{
//check if the wine is in database
$thename=$_POST['name'];
$this->db->select('*');
$this->db->from('wines');
$this->db->where('name', $thename);
$data['query']= $this->db->get();
echo $query->num_rows();
}