anonīms Posted February 28, 2009 Report Share Posted February 28, 2009 (edited) Nesaprotu no kuriens man uzrodas ' (puspēdiņa) 2 vs 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1','15','1 ada')' at line 4 mysql_query("INSERT INTO tabula (kas_spele,pret_ko_spele,turnira_id,tips) VALUES ('{$kas_spele}','{$pret_ko_spele}','{$turnira_id}','1 ada')") or die(mysql_error()); izvadot vnk ar echo tā pēdiņa nav (echo $sql) uiiiiiiiiiiiiiiiiiiii, kverijā tikko ieraudziju, kad iemetu foruma kodā Viss kārtībā Edited February 28, 2009 by anonīms Quote Link to comment Share on other sites More sharing options...
bubu Posted February 28, 2009 Report Share Posted February 28, 2009 Tas saucās apostrofs, nevis puspēdiņa :) Un btw skaitļus nevajag likt pēdiņās/apostrofos. Quote Link to comment Share on other sites More sharing options...
anonīms Posted February 28, 2009 Author Report Share Posted February 28, 2009 man tur nav skaitlis, skaitis bija vnk testam, jo skatijos vai tiešām $blalbla nez no kurienes uzrodas ' Quote Link to comment Share on other sites More sharing options...
Kaklz Posted March 1, 2009 Report Share Posted March 1, 2009 vispār (ja vien tas jau kaut kur iepriekš kodā netiek darīts, tad) stipri ieteiktu palasīt par mysql_real_escape_string, citādi visādi brīnumi tev tur var parādīties ;) Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 1, 2009 Author Report Share Posted March 1, 2009 da nu, nevar būt... :D Vispār viņš vēl ir testa variantā tapēc intval un string nav. Quote Link to comment Share on other sites More sharing options...
Kaklz Posted March 1, 2009 Report Share Posted March 1, 2009 nu ņirdz vien ņirdz, bet šitādu "testa variantu" rakstīšana ir aplama. Jāraksta uzreiz un kārtīgi vismaz ar drošību saistītās lietas noteikti. 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.