Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-16-2007, 06:35 PM
jap jap is offline
Junior Member
 
Join Date: Apr 2007
Posts: 23
Default Imposible to do 2 db commands after eachother?

Hi,

I wanted to do this:
PHP Code:
        $data = array(
            
'current_amount'  => $newAmount,
            
'time_lastupdate' => time()
        );
        
$where $this->db->quoteInto('user_id = ?'$userid);    
        
$row_affected $this->db->update('users_credits'$data$where);
        
        
// Add new record to credits history        
        
$data = array(
            
'action'      => $actiontype,
            
'code'           => $code,
            
'amount'      => $amount,
            
'userid'      => $userid,
            
'comment'     => $comment,
            
'time'        => time()
        );
        
$this->db->insert('users_credit_history'$data); 
But only the first command (update()) is executed correctly the other isn't and I get no error message or anything like that :s
Can anyone help me out here?
Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:14 AM.