Welcome Guest, Not a member yet? Register   Sign In
MySQL Inserting twice and not sure why
#4

[eluser]JamesD[/eluser]
Code:
function start_page()
{
$obj =&get;_instance();
$sql = 'INSERT INTO `site_requests` (`id`, `request`, `referer`, `ip`, `xip`, `type`, `user_agent`, `date`) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);';
$obj->db->query($sql);
}

Do you need the instance for the query?
Could you not use
Code:
$this->db->query($sql);
without the extra instance?

It looks like that's where it could be squeezing in.

-JamesD


Messages In This Thread
MySQL Inserting twice and not sure why - by El Forum - 01-10-2008, 10:33 AM
MySQL Inserting twice and not sure why - by El Forum - 01-10-2008, 10:49 AM
MySQL Inserting twice and not sure why - by El Forum - 01-10-2008, 11:57 AM
MySQL Inserting twice and not sure why - by El Forum - 01-10-2008, 12:03 PM
MySQL Inserting twice and not sure why - by El Forum - 01-10-2008, 12:08 PM
MySQL Inserting twice and not sure why - by El Forum - 01-10-2008, 12:24 PM
MySQL Inserting twice and not sure why - by El Forum - 01-10-2008, 02:29 PM
MySQL Inserting twice and not sure why - by El Forum - 01-11-2008, 10:45 AM
MySQL Inserting twice and not sure why - by El Forum - 01-11-2008, 11:10 AM
MySQL Inserting twice and not sure why - by El Forum - 01-11-2008, 03:02 PM
MySQL Inserting twice and not sure why - by El Forum - 01-11-2008, 03:28 PM
MySQL Inserting twice and not sure why - by El Forum - 01-12-2008, 01:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB