PHP MYSQL: Ekle "+"

1 Cevap php

i taktığınızda let ki:

mysql_query("insert into table1 (title) values (\"date + book\")");

"+" işareti bir alana dönüştürülür. bu nedenle "tarih kitabı" değil "tarih + kitap" oldu

what should i do to insert it as it is. but if i directly query this to MYSQL it accept it as it is.. please clear my confusion.. thanks

"UPDATE campus_bookinfo SET categoryid = ".$category.", bookversion = bookversion+1, 
iAmount = \"".str_replace(",","",$price)."\", lectureName = '".$tag."', eStatus = 3 WHERE idx_campus_bookinfo = ".$id_bookinfo;

1 Cevap

Böyle deneyin:

mysql_query("insert into table1 (title) values ('date + book')")

ya da bir değişken ise:

mysql_query("insert into table1 (title) values ('$somevariable')")