Welcome Guest, Not a member yet? Register   Sign In
$this->db->update doesn't always work?
#1

[eluser]CodeIgniterNewbie[/eluser]
In my LAMP application (using CodeIgniter), I have a call to $this->db->update... that generates a SQL like the following:

Code:
UPDATE `MyTable` SET `MyProcess` = 5 WHERE `Id` = 1

The problem is that this seems to work intermittently -- and I currently have no idea what might be wrong. Is there anything about MySQL I need to know about when trying to update? I'm adding & updating records a lot (but probably no more than one query every 5 seconds). When I run the query in phpMyAdmin, it works fine.

Suggestions on how to troubleshoot this?
#2

[eluser]Dennis Rasmussen[/eluser]
Need to see more code than that.
Do you have any functions or statements around that query?
If so, do they run when expected? - Use echo(), die(), print() and print_r() to debug near your query.




Theme © iAndrew 2016 - Forum software by © MyBB