Latest Blogs

clinical treatments

Just because the word alter is reserved does not mean it cannot be used, it just has special requirements to use it as the MySQL engine is trying to call the functionality for the alter command. To fix the issue, you will want to surround the word with backticks (`), this is usually the button just to the left of the "1" button on the keyboard. The code block below shows how the code will need to look in order to run properly. CREATE TABLE `alter` (first_day DATE, last_day DATE); Missing Data Sometimes data in the database is missing. This can cause issues when this data is required for a query. For example, if a database is built requiring an ID number for every student, it is reasonable to assume a query will be built to pull a student record by that ID number. Such a query would look like: SELECT * from students WHERE studentID = $id If the $id is never properly filled in the code, the query would look like this to the server: SELECT * from students WHERE studentID = Since there is nothing there, the MySQL engine gets confused and complains via a 1064 error. How to fix it: Hopefully your application will have some sort of interface that will allow you to bring up the particular record and add the missing data. This is tricky because if the missing data is the unique identifier, it will likely need that information to bring it up, thus resulting in the same error. You can also go into the database (typically within phpMyAdmin) where you can select the particular row from the appropriate table and manually add the data. Mistyping of Commands One of the most common causes for the 1064 error is when a SQL statement uses a mistyped command. This is very easy to do and is easily missed when troubleshooting at first. Our example shows an UPDATE command that is accidentally misspelled.