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...
$depquery = "SELECT * FROM phpvms_schedules
WHERE code = 'FE'
AND phpvms_schedules.enabled = '1'
ORDER BY deptime ASC";
$deplist = DB::get_results($depquery);
How can I speed this query up?
foreach($deplist as $flight)