Make sure you're exec'ing against the correct database with identical schema.
Different MySQL versions? Schema? Permissions?
var_dump() and cut'n'paste onto the server to make sure the query DOES
run, then look for remote DB connection issues, permissions, database, etc.
Are there multiple "num" fields across the two tables such that the "ORDER BY"
clause is ambiguous? Whole lot of possibilities. Run the var_dump() query
first...it's the best place to start.
----- Original Message -----
From: "Christine Clerc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 25, 2002 12:35 AM
Subject: [PHP-DB] A JOIN that works sometimes ?
> Could anyone please help me with that query ?
> $req="SELECT * FROM tab AS C INNER JOIN inter AS A ON
> C.id_tab=A.id_tab WHERE A.id_cat IS NULL OR A.id_cat = 0 ORDER BY
> $result = mysql_query ($req,$db);
> It works on my machine but not on the server.
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php