Variables in sql

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Variables in sql

Post by Todlerone »

Hello all and thank-you in advance for any help/suggestions. This doesn't seem to work for me. Can you please point out what I missed.

Code: Select all

$sql = "CREATE TABLE jos_".$this->league."_standings".$this->season." (
		  Team tinyint(3) NOT NULL,
		  TeamFull varchar(20) NOT NULL,
		  GP tinyint(4) NOT NULL,
		  WIN tinyint(4) NOT NULL,
		  LOSS tinyint(4) NOT NULL,
		  TIE tinyint(4) NOT NULL,
		  RF smallint(6) NOT NULL,
		  RA smallint(6) NOT NULL,
		  WP decimal(3,3) NOT NULL,
		  FORF tinyint(4) NOT NULL,
		  RAIN tinyint(4) NOT NULL,
		  DARK tinyint(4) NOT NULL,
		  CANC tinyint(4) NOT NULL,
		  STREAK varchar(3) NOT NULL,
		  PRIMARY KEY  (Team)
		) ENGINE=InnoDB DEFAULT CHARSET=utf8";
Last edited by Todlerone on Tue May 25, 2010 3:54 pm, edited 1 time in total.
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: Variables in sql

Post by mikosiko »

check the position of your ' 's .... they are misplaced
Post Reply