any time i try to access a page i created it says:Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
SELECT * FROM (`_db_tb_article`) WHERE `article_id` =
Filename: C:\xampp\htdocs\gtech\__ghtec__$y$tem__core\database\DB_driver.php
Line Number: 330
this is my model
<?php
class article_model extends CI_Model {
function add()
{
$this->db->insert('article',$_POST);
if($this->db->_error_number())
{
return $this->db->_error_number();
}
}
function update($article_id, $data_fields = NULL){
if($data_fields == NULL)
{
$this->db->where("article_id =".$article_id);
$this->db->update('article',$_POST);
}
else
{
$this->db->where("article_id =".$article_id);
$this->db->update('article',$data_fields);
}
$is_error = $this->db->_error_number();
if($is_error){
echo $is_error;
}
return TRUE;
}
function delete($id){
$this->db->where("article_id =".$id);
return $this->db->delete('article');
}
//return the article with this id
function get_article($id){
$this->db->where("article_id =".$id);
$query = $this->db->get('article');
if ($query->num_rows() > 0){
return $query->row_array();
}
else
echo $this->db->_error_message();
return FALSE;
}
//return the available article in the table
function get_article_all(){
$query = $this->db->get('article');
if ($query->num_rows() > 0)
{
foreach($query->result() as $row)
{
$result[] = $row;
}
return $result;
}
}
}
i have checked the line 330 and can't seem to find a way to solve that problem....i need help