Jump to content

[SOLVED] Syntax problem


bluebyyou

Recommended Posts

I am trying to create this table, but no mater what I try I keep getting syntax errors. Even when I hard code a year instead of $year I get it. I have tried changing all of my single quotes to these things ` `. I am stumped why It wont work. Can anyone see what I am doing wrong?

 


$query2 = "CREATE TABLE '$year' (
	`day` INT(11) NOT NULL AUTO_INCREMENT,
	`event`' DATE NOT NULL,
	PRIMARY KEY(day))"; 

Link to comment
https://forums.phpfreaks.com/topic/56981-solved-syntax-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.