Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- What is the problem with this codeigniter
- I am passing this array
- Array
- (
- [vrnoa] => 6
- [vrdate] => 2013/11/26
- [party_id_co] => Rearmsa asdf
- [remarks] => Remarks go here
- [etype] => navigation
- )
- to the function:
- public function saveStockMain($data)
- {
- $this->db->where('vrnoa',$data['vrnoa']);
- $q = $this->db->get('StockMain');
- if ( $q->num_rows() > 0 ) {
- $this->db->where('vrnoa',$data['vrnoa']);
- $this->db->update('StockMain',$data);
- }
- else {
- $this->db->insert('StockMain',$data);
- }
- }
- And it keeps inserting 0 at the party_id_co column in the database, while there isn't 0 in the array that I have passed, there is "Rearmsa asdf".
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement