0

This is not a generic PHP / MySQL question because you can use uppercase or lowercase as you wish in MySQL because MySQL is a case insensitive.

But in WordPress Documentation said,

SQL keywords, like CREATE TABLE and UPDATE, must be uppercase.

Why is that? May be it is readable. But why it said "MUST be"?

0

Generally it does not (although it is probably a good thing to do and hopefully it is part of the coding standard.

That specific quote refers to the API which lets you add or change columns in the DB. For that to work wordpress needs to compare what the definition of the table in the DB to what the plugin asks it to create/change if needed, and without looking at the code, being specific about the case that is used just makes the "compare" code easier to write.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.