Jump to content

SQL syntax error


jeff5656

Recommended Posts

Cannot see what is wrong with my code.  I get this error" 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 'vachar(20) NOT NULL, icufellow varchar(20) NOT NULL, icustaff varchar(20) NO' at line 4"

 

 

<?php 

include ("connectdb.php");


$sql = "CREATE TABLE staffsched
(
  which_date int(254) NOT NULL,
  which_month vachar(20) NOT NULL,
  icufellow varchar(20) NOT NULL,
  icustaff varchar(20) NOT NULL,
  f2staff varchar(20) NOT NULL,
  intervent varchar(20) NOT NULL,
  wb_ipd varchar(20) NOT NULL,
  lung_tx varchar(20) NOT NULL,
  phtn varchar(20) NOT NULL,
  warren varchar(20) NOT NULL,
  edit_date datetime NOT NULL,
  PRIMARY KEY  (`which_date`)
)";

// Execute query
mysql_query($sql) or die(mysql_error());


?>

Link to comment
https://forums.phpfreaks.com/topic/133005-sql-syntax-error/
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.