homers Posted September 26, 2009 Report Share Posted September 26, 2009 mysql_query("INSERT INTO cw(clan1,clan2,rez,map,x,date) VALUES(".$_POST['team1'].", ".$_POST['team2'].", ".$_POST['rez'].", ".$_POST['map'].", ".$_POST['x'].", ".$_POST['date'].")")or die(mysql_error()); Rada: 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 ' 22, 22, 222, 22, )' at line 1 Un db nekas neieliekas, kas pa vainu? Quote Link to comment Share on other sites More sharing options...
waplet Posted September 26, 2009 Report Share Posted September 26, 2009 nepareiza sintake VALUES('".$_POST['team1']."', '".$_POST['team2']."', '".$_POST['rez']."', '".$_POST['map']."', '".$_POST['x']."', '".$_POST['date']"') paprovē šādi Quote Link to comment Share on other sites More sharing options...
marcis Posted September 26, 2009 Report Share Posted September 26, 2009 Mainīgais $_POST['x'] ir 22, bet $_POST['date'] ir tukšs, rezultātā kverija beigu daļa izskatās šāda "22, )", kas, protams, nav pareizi. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.