PDA

View Full Version : match time



3hills
17-07-2015, 01:10 PM
--------------------------------------------------
Topic Transfered from old forum
--------------------------------------------------
Can i know how do i list the games according to the match time?

You can take a look at http://www.sleague.info/prediction-league

Current listings:
Match Time Home Score Away
01-May 19:30 Albirex Niigata FC (S) - Hougang United FC
01-May 19:30 Brunei DPMM FC - Balestier Khalsa FC
02-May 19:30 Geylang International FC - Warriors FC
28-Apr 19:30 Home United FC - Courts Young Lions
24-Apr 19:30 Warriors FC - Brunei DPMM FC

My desired listings accord to match time:
Match Time Home Score Away
24-Apr 19:30 Warriors FC - Brunei DPMM FC
28-Apr 19:30 Home United FC - Courts Young Lions
01-May 19:30 Albirex Niigata FC (S) - Hougang United FC
01-May 19:30 Brunei DPMM FC - Balestier Khalsa FC
02-May 19:30 Geylang International FC - Warriors FC

Pls advise. Thank you.

3hills
17-07-2015, 01:11 PM
--------------------------------------------------
Topic Transfered from old forum
--------------------------------------------------
Hello

normally it is listed from the minimum date to maximum maybe you set other years for those matches?

the responsible code is at <joomla directory>/components/com_multileague/models/matches.php

try chagning the lines

->order("g.match_start_time , g.id");

to

->order("g.match_start_time DESC, g.id");

but this will make the matches to be sorted from the max date to min

also try this

->order("g.match_start_time ASC, g.id");
but it is ASC from default...

3hills
17-07-2015, 01:12 PM
--------------------------------------------------
Topic Transfered from old forum
--------------------------------------------------
Thanks for the reply.

order("g.match_start_time , g.id"); is not present at <joomla directory>/components/com_multileague/models/matches.php but at <joomla directory>/components/com_multileague/models/matcheresults.php

I have added the code order("g.match_start_time , g.id"); at <joomla directory>/components/com_multileague/models/matches.php and i get the desired results.;)