I'm trying to insert user inputted values as well as a string that is a combination of the month year of the start date + the user inputted quarter. What is wrong. please help!!!!!
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "addUser")) {
$date= $_POST['start_date'];
$d=date_parse_from_format("Y-m-d",$date);
$insertSQL = sprintf("INSERT INTO contacts (USER_NAME, START_DATE, THREE_MONTH, SIX_MONTH, TWELVE_MONTH, QUARTER, ORDER) VALUES (%s, %s, %s, %s, %s, %s,'".$d["month"].$d["year"].$_POST['quarter']."' )",
GetSQLValueString($_POST['user'], "text"),
GetSQLValueString($_POST['start_date'], "date"),
GetSQLValueString($_POST['3month'], "date"),
GetSQLValueString($_POST['6month'], "date"),
GetSQLValueString($_POST['12month'], "date"),
GetSQLValueString($_POST['quarter'], "text"));
error i'm getting:
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 'ORDER) VALUES ('boobz', '2013-11-22', '2013-11-29', '2013-11-23', '2013-11-02', ' at line 1
$insertSQLvariable?