Help with INNER JOIN problem (MySQL)
Posted: Tue Aug 10, 2004 8:16 am
Can anyone see what's wrong with this piece of SQL? It runs fine on my dev PC (WinXP Pro, PHP 4.3.8, MySQL 3.23.49), but not on the live server(RH Linux, PHP 4.3.2, MySQL 3.23.58)
As a summary, it is used in an online fantasy strategy game to update citadels for races that can ride(eg men and elves as opposed to dwarves, giants, etc).
The error lies with the inner join. Removing this makes the SQL work, although I must then also remove the "AND RaceCanRide = 1" condition, so dwarves and giants get riders.
As I said earlier, this code works fine onmy dev PC.
Any ideas?
As a summary, it is used in an online fantasy strategy game to update citadels for races that can ride(eg men and elves as opposed to dwarves, giants, etc).
Code: Select all
UPDATE Lords INNER JOIN Races ON RaceID = LordRaceID
SET Riders = Riders + 5, Warriors = Warriors + 10
WHERE GameID = 67
AND UserID <> 0
AND INSTR('CY', Garrison) > 0
AND Riders + Warriors < 2500
AND RaceCanRide = 1As I said earlier, this code works fine onmy dev PC.
Any ideas?