[Solved] Codeigniter Query Misses First One Off List |
On my query2 foreach loop it produces a list as shown in image that is attached.
But for some reason it keeps on missing the first ones on both list from extra events table It's missing Test 1 and Example 1 I am not sure why it does not show it on list seems to skip it. PHP Code: public function get_events($year, $month) { Any ideas on how to solve issue?
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
I don't see exactly where the problem occurs, but you should consider using a join to retrieve the results in a single query, rather than making an additional query for each result of the first query. Regardless of whether it makes it easier to generate the output, it will speed things up, especially when you have more events in the database.
(12-29-2015, 08:45 AM)mwhitney Wrote: I don't see exactly where the problem occurs, but you should consider using a join to retrieve the results in a single query, rather than making an additional query for each result of the first query. Regardless of whether it makes it easier to generate the output, it will speed things up, especially when you have more events in the database. Yes I have used join before does not let me use the db limit correct and produces the same result.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
(12-29-2015, 08:45 AM)mwhitney Wrote: I don't see exactly where the problem occurs, but you should consider using a join to retrieve the results in a single query, rather than making an additional query for each result of the first query. Regardless of whether it makes it easier to generate the output, it will speed things up, especially when you have more events in the database. I have solved it here are the changes I have had to make Code: public function get_calendar_events($year, $month) {
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |