How Did I Miss That!
Just been looking at the PHP documentation for the mysql_query function. I couldn’t possibly imagine the number of times I’ve used that function, and the number of queries that I have written.
I’ve just discovered this little bit in the documentationThe query string should not end with a semicolon.Wow! I’ve always insisted that it is present! It certainly works if it is present!
Now I’m thinking ‘Why not?’. I mean, it’s part of the SQL language to put a semi-colon on the end, so why shouldn’t I do it when I execute a perfectly valid query from with PHP?



Javascript
Probably for the same reason that Javascript handlers in HTML don’t want semicolons. Also suggests that you can’t have multiple statements.