[eluser]Peter O'Sullivan[/eluser]
Correct me if I'm wrong xwero, but your code
Code:
// Check if a record exists for this SKU
$this->db->where('sku',$sku);
if ($this->db->count_all_results() == 0) {
Needs to have the a 'from' part.
The code needs to be
Code:
// Check if a record exists for this SKU
$this->db->from('products')->where('sku',$sku);
if ($this->db->count_all_results() == 0) {
Correct?