Page 1 of 1

on unix, but not on windows

Posted: Sat Apr 15, 2006 6:04 am
by s.dot
I have a query that appears to work like I want it to on unix, but not on windows?

Code: Select all

$active_result = mysql_query("
    SELECT
        `topicid`,
        `forumid`
    FROM
        `forumentries`
    WHERE
        `author` = '{$array['id']}'
    GROUP BY
        `topicid`
    ORDER BY
        `time`
    DESC LIMIT 10
") or die(mysql_error());
On windows, this orders by the topicid desc

IE:

9
8
7
6
5

Where on unix, it orders it by time desc

IE:

8
5
7
6
9

Posted: Sat Apr 15, 2006 6:07 am
by s.dot
Actually the query on the unix server is this

Code: Select all

$query = mysql_query("SELECT `topicid`,`forumid` FROM `forumentries` WHERE `author` = '$u' GROUP BY `topicid` ORDER BY `time` DESC LIMIT 10") or die(mysql_error());
It's identical, except 'author' in the unix query is a string, where author on the windows query is an integer

[edit] I don't have access to the unix server right now to test it