08-30-2008, 11:09 AM
[eluser]Jesse Schutt[/eluser]
So, forums are places to ask questions, right? Hopefully you can help me out with this simple one.
I have a need to update a field on my DB. So I should have that function with in my model, correct? Here is the code for my controller
Here is what is in my model function called "verify_payment"
I just can't get this to update the "payment_received" field. If I take the code from the model and put it into my controller, it will update the field correctly. So I am assuming that it has to do with passing the array to the model.
Any ideas?
Thanks in advance!
Jesse
So, forums are places to ask questions, right? Hopefully you can help me out with this simple one.
I have a need to update a field on my DB. So I should have that function with in my model, correct? Here is the code for my controller
Code:
$paypal_custom_field = explode(":", $this->paypal_lib->ipn_data['custom']);
$this->load->model('regform_model', '', TRUE);
$this->regform_model->verify_payment($paypal_custom_field);
Here is what is in my model function called "verify_payment"
Code:
function verify_payment()
{
$this->db->where('first_name', $paypal_custom_field[ 0]);
$this->db->where('last_name', $paypal_custom_field[ 1]);
$this->db->where('email', $paypal_custom_field[ 2]);
$this->db->set('payment_received', TRUE);
$this->db->update('table_name');
}
I just can't get this to update the "payment_received" field. If I take the code from the model and put it into my controller, it will update the field correctly. So I am assuming that it has to do with passing the array to the model.
Any ideas?
Thanks in advance!
Jesse