You'll have to be more specific. Usually this error indicates that your SQL is wrong. It is usually accompanies by a message indicating in what way the SQL in unacceptable. There may be a different version of MySQL on your two machines - be sure to check.
When developing an application, you should aim for the same versions of everything (including operating system) on your development and production boxes.
Mark