[Return]

Report a post

Preview
>>66548
dont overestimate me, its definitely not good enough for your repo. idk php. ill just explain what i done

in mod_cat
i made a urlparam for the sort type and passed it into fetchThreadList()
in pio.mysqli
fetchThreadList() i made $tmpSQL be dependent on the sort type.
then its just different sql queries to rearrange
like

if($sort="bump") $tmpSQL = 'SELECT no FROM '.$this->tablename.' WHERE resto = 0 ORDER BY '.($isDESC ? 'no' : 'root').' DESC';
elseif($sort
= "lastreply") $tmpSQL = 'SELECT resto FROM '.$this->tablename.' WHERE (no, resto) IN (SELECT MAX(no), resto FROM '.$this->tablename.' GROUP BY resto) AND resto != 0 ORDER BY no DESC';
...

i only found 1 place that sets the optional $isDESC in fetchThreadList idk what for
and it's too much trouble to change every pio.DB file

it werks but... meh
im going to try making a json endpoint instead sweat2
Post number No.66549
Board Site Discussion@Heyuri
Optional. Describe what's wrong with it.