Welcome Guest, Not a member yet? Register   Sign In
A PHP Error was encountered
#1

[eluser]jiahui[/eluser]
Hello, all experts.

What my problem is absolutely same with this article http://ellislab.com/forums/viewthread/45460/#580204 described

But, have tried with use the suggestions of that article what I found there, but my problem is still there.

This is the error message always appearing at the bottom of my web page.
Quote:A PHP Error was encountered
Severity: Warning

Message: Unknown: 2 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query()

Filename: Unknown

Line Number: 0


Any kindness expert willing to guide me drive to the right path?

Following is my source code:

1. In Model :
Code:
<?php
class usercontacts_model extends Model {

    function get_admin_contacts()
    {
        $this->db->where('banned = 0');
        $this->db->orderby('lastname', 'asc');

        return $this->db->get('user');
    }
}
?>

2. In Controller :
Code:
function index()
    {
    $data['accounts'] = $this->usercontacts_model->get_admin_contacts();
}

3. views :

Code:
<?php foreach($accounts->result() as $user):?>
                        <tr>
                            <td>&lt;?php echo $user->firstname.' '.$user->lastname; ?&gt;</td>
                            <td>&lt;?php echo $user->email; ?&gt;</td>
                            <td>&lt;?php echo $user->phone; ?&gt;</td>
                            <td>&lt;?php if ($user->groupid==1) { ?&gt;
                                <img src="&lt;?php echo base_url();?&gt;images/admin.png" border="0" alt="Admin"/>
                                &lt;?php } else if ($user->groupid==2) { ?&gt;
                                <img src="&lt;?php echo base_url();?&gt;images/exporter.png" border="0" alt="Exporter"/>
                                &lt;?php } else if ($user->groupid==3) { ?&gt;
                                <img src="&lt;?php echo base_url();?&gt;images/importer.png" border="0" alt="Importer"/>
                                &lt;?php } ?&gt;&nbsp;
                                &lt;?php if ($user->groupid==1) { ?&gt;
                                Administrator
                                &lt;?php } else if ($user->groupid==2) { ?&gt;
                                Exporter
                                &lt;?php } else if ($user->groupid==3) { ?&gt;
                                Importer
                                &lt;?php } ?&gt;</td>
                            <td>&lt;?php echo $user->ip_address; ?&gt;</td>
                            <td>&lt;?php echo $user->last_login; ?&gt;</td>
                            <td align="center">
                            &lt;?php if ($this->session->userdata('groupid')==1){ ?&gt;
                                    &lt;?php echo ' ['.anchor('accounts/delete/'.$user->id, $this->lang->line('actions_delete'),array('class' => 'delete', 'title'=>$user->firstname)).']';?&gt;
                                    <a >id; ?&gt;"><img src="&lt;?php echo base_url(); ?&gt;images/edit.png" border="0"/></a>
                            &lt;?php }else if ($this->session->userdata('user_id')== $user->id) { ?&gt;
                                    <a >id; ?&gt;"><img src="&lt;?php echo base_url(); ?&gt;images/edit.png" border="0"/></a>
                            &lt;?php } ?&gt;
                            </td>
                        </tr>
                        &lt;?php endforeach;?&gt;


Messages In This Thread
A PHP Error was encountered - by El Forum - 11-17-2009, 10:16 PM
A PHP Error was encountered - by El Forum - 11-18-2009, 08:34 PM
A PHP Error was encountered - by El Forum - 11-18-2009, 09:41 PM
A PHP Error was encountered - by El Forum - 11-19-2009, 12:25 AM
A PHP Error was encountered - by El Forum - 11-19-2009, 04:52 AM
A PHP Error was encountered - by El Forum - 11-19-2009, 08:33 PM
A PHP Error was encountered - by El Forum - 11-19-2009, 09:36 PM
A PHP Error was encountered - by El Forum - 11-19-2009, 09:49 PM
A PHP Error was encountered - by El Forum - 11-19-2009, 09:56 PM
A PHP Error was encountered - by El Forum - 11-19-2009, 10:41 PM
A PHP Error was encountered - by El Forum - 11-19-2009, 10:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB