Jump to content
php.lv forumi

You have an error in your SQL syntax


Recommended Posts

Posted (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 by anonīms
Posted

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 ;)

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...