on unix, but not on windows

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

on unix, but not on windows

Post 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
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post 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
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply