error with my SQL syntax, hmm? (inserting into MySQL)
Posted: Sun Dec 10, 2006 5:42 am
feyd | Please use
(closes later) it said error with the ,)VALUES (the following digits)
sorry to ask so much lolz, nearly 90 posts, 4 days XD
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Not sure why im getting this, -.-
but I need help with it:/Code: Select all
$con3 = mysql_connect("localhost","root","");
if (!$con3)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("chars", $con3);
$sql3="INSERT INTO $tcn (
`strlvl`, `strdmg`, `strxp`,
`strdiv`, `dexlvl`, `dexcth`,`dexxp`, `dexdiv`, `currlife`,
`currmaxlife`, `deflvl`, `defxp`, `defda`, `intlvl`, `intxp`, `foclvl`, `focxp`, `mag`,
`weapon`, `spell`, `gold`, `banked gold`, `charname`,)
VALUES ('4','1','0','1','4','0','0','1','13','13','4','0','0','4','0','4','0','13',
'Fists','Ignite','0','10','$tcn')";
if (!mysql_query($sql3,$con3))
{
die('<font color="blue" size="3"><i> Error: ' . mysql_error()) . '</font></i>';
}sorry to ask so much lolz, nearly 90 posts, 4 days XD
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]