[eluser]smilie[/eluser]
mddd,
I stumbled upon something.
Code:
Code:
$this->db1 = $this->load->database('db',TRUE);
$this->db1->where('created >= NOW() - INTERVAL 1 DAY','',FALSE);
$this->db1->from('table');
$res = $this->db1->count_all_results();
Produces:
Code:
SELECT COUNT(*) AS `numrows`
FROM (`table`)
WHERE created >= NOW() - INTERVAL 1 DAY
This is from the profiler. CodeIgniter returns 0 found rows.
Same query in the PHPMyAdmin returns 1 found row.
However I saw in another query that WHERE / AND statement is like this:
Code:
AND `id` = 'action_id'
Now, I do not know if this is profiler 'error' or my browser - or...
But, when I copy & paste query in PHPMyAdmin it also returns 0 results.
However, if I remove quotes from the query (particullary these -> `` quotes) - then it is working.
Maybe this helps some? :-)
Regards,
Smilie