It means just what it says. It doesn't think the SQL you are coding is correct. It might not be the SQL itself mind, but the PHP around it.
Best thing is to stick the code on the forum, so we can see if there's any glaring mistakes.
Also try testing you SQL directly in MySQL rather than on the PHP page.
Emma