vailixi Posted September 4, 2015 Share Posted September 4, 2015 I'm trying to follow this tutorial for a phpmysql counter script. http://www.phpeasystep.com/phptu/7.html I looks pretty straight forward. CREATE TABLE `counter` ( `counter` int(9) NOT NULL default '0' ) TYPE=MyISAM; But when I try to make the database in mysql it tells me I have a syntax error and says see documentation on your current mysql version. I don't know mysql well enough to understand what I'm doing wrong. I tried looking it up but to no avail. Quote Link to comment Share on other sites More sharing options...
Jason Cooper Posted September 4, 2015 Share Posted September 4, 2015 It could be that you're using the wrong quotes. The example you have in your post works, but if you're copying it by hand it's easy to use an apostrophe (') when it should be a back-tick (`). The good news is that in this case you don't need the quotes at all, you can simply use: CREATE TABLE counter (counter int(9) NOT NULL default 0); You'll also notice that I've dropped the TYPE parameter from the end of the line as MyISAM is usually the default engine type, you can check if this is the case in your MySQL instance with: SHOW ENGINES; Quote Link to comment Share on other sites More sharing options...
vailixi Posted September 5, 2015 Author Share Posted September 5, 2015 Cool. I got something working now. I'm not good at databases at all. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.