The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
SQL error, tried to figure it out, but not sure why it isn't working
Okay here is the table layout
id int(8) No 0 name varchar(50) Yes NULL dob varchar(50) Yes NULL height varchar(50) Yes NULL weight int(3) Yes 0 jersey varchar(50) Yes NULL from varchar(50) Yes NULL position varchar(50) Yes NULL teamname varchar(50) Yes NULL sport varchar(25) Yes NULL Here is the mysql query Code:
$query = "INSERT INTO add_temp_player (id, name, height, weight, jersey, from, position, teamname, sport) VALUES ($_POST[id2],'$_POST[name]','$_POST[height]',$_POST[weight],'$_POST[number]','$_POST[from]','$_POST[position]','$_POST[team]','$_POST[sport]')"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); INSERT INTO add_temp_player (id, name, height, weight, jersey, from, position, teamname, sport) VALUES (59,'Larry Hughes',' 6-5',184,' 32',' St. Louis',' G','cavaliers','') Here is the error Query failed: 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 'from, position, teamname, sport) VALUES (591,'Luis Alicea','',0 The database is connected, because the other queries, on the same page work. Which looks right to me. I am not sure why it isn't working, can anyone help me out. Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|