I am having issues with the following script. I don't see anything wrong here. Very basic but it is giving me a headache. Any suggestions are welcome. I am running version 5.1.37 and the error is:

Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''visit_recipes'
('id' INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
'name' text NO' at line 1
(0 ms taken)

CREATE TABLE 'visit_recipes' 
('id' INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, 
'name' text NOT NULL, 'ingredients' text NOT NULL, 
'instructions' text NOT NULL, 'created_by' INTEGER NOT NULL, 
'userip' VARCHAR(16), 'date_added' text NOT NULL, PRIMARY KEY('id'));

You appear to be translating from (postgresql?) where type text is the best option. In MySQL, varchar(size) is a better choice if possible. However, it does work, so I have not changed it. The syntax issue is the single quotes. If you want to quote table or column names, you need to use back-quote (`) not a normal quote ('). I've just removed your wrong quotes. This works for me:

CREATE TABLE visit_recipes (
  id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 
  name text NOT NULL, 
  ingredients text NOT NULL, 
  instructions text NOT NULL, 
  created_by INTEGER NOT NULL, 
  userip VARCHAR(16), 
  date_added text NOT NULL 
);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.