DB Insert Problem: Unknown Column - Column never referenced in code

#1
[eluser]Tumac[/eluser]
I have a function that updates two tables. In my code I pass an ID field to be updated. The ID comes from a javascript function/application.

I have made no changes to my code and at one time a couple of weeks ago, the code was working perfectly.

The error below is referencing 'delivery_detail.poID'. The javascript does not reference delivery_detail, the PHP does not reference delivery_detail


The error is (from firebug):

<p>Error Number: 1054</p><p>Unknown column 'delivery_detail.poID' in 'where clause'</p><p>UPDATE `status_order` SET `status` = 'Stock', `stockDate` = 1272214095 WHERE `poID` = '52988'</p> </div>

CI Code:
Code:
//Controller
function convertToStock ($poID=null) {
        $poID=$this->input->post('poID');
        
        if ($poID) {
        $data=$this->inTransit_model->convertStock($poID);
        $this->_printSuccessTrue($data);
        } else {
            $this->_printSuccessFalse();
        }
        
    }
............
//Model
function convertStock($poID) {
        $this->load->helper('date');
        $orderArray = Array (
            'status' => 'Stock'
            ,'stockDate' =>now()
        );
        $this->db->where('poID', $poID);
        $this->db->set($orderArray);
        $this->db->update('status_order');
        
        $tallyArray = Array (
            'tallyStatus' => 'Stock'
            ,'stockDate' =>Now()
        );
        
        $this->db->where('poID', $poID);
        $this->db->set($tallyArray);
        $this->db->update('status_tally');
        
        return true;
        
    }


Messages In This Thread
DB Insert Problem: Unknown Column - Column never referenced in code - by El Forum - 04-25-2010, 11:03 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.