I have written this query to extract information from a database to produce a foreach statement for rows in a table. It is however very slow, and it takes between 6-15 seconds to load the page.
Then I echo the table and elements inside it, and I use a foreach statement like this...Code:$depquery = "SELECT * FROM phpvms_schedules WHERE code = 'FE' AND locate(dayofweek(convert_tz(now(),'+1:00','+0:00'))-1,".TABLE_PREFIX."schedules.daysofweek)>0 AND phpvms_schedules.enabled = '1' ORDER BY deptime ASC"; $deplist = DB::get_results($depquery);
How can I speed this query up?Code:foreach($deplist as $flight)


Reply With Quote


I did it using the above code, and also using the checkboxes you've mentioned in the table structure.



Bookmarks