|
|
|
insert ไม่ลงครับ ช่วยด้วย insert into std4_parent(`STU_CODE`)values('swen's'); |
|
|
|
|
|
|
|
type again
<?php
$str = "Is your name O'reilly?";
// Outputs: Is your name O\'reilly?
echo addslashes($str);
?>
OR
<?php
function string_needs_addslashes($str)
{
if (($qp = strpos($str,'\'')) !== false)
{
if ($sp<1 || $str[$qp-1] != '\\')
return true;
else
return string_needs_addslashes(substr($str,$sp+1));
}
return false;
}
?>
|
|
|
|
|
Date :
31 มี.ค. 2548 17:02:08 |
By :
Mairu |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insert into std4_parent(`STU_CODE`)values('swen\'s');
|
|
|
|
|
Date :
31 มี.ค. 2548 17:20:48 |
By :
boy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ex.
$bodytag = str_replace("'", "\'", "body text's body's ");
echo "<br>a result => ".$bodytag ;
app.
$query = str_replace("'", "\'", " insert into std4_parent(`STU_CODE`)values('swen's') ");
เผื่อช่วยได้ฮะ
|
|
|
|
|
Date :
31 มี.ค. 2548 18:24:08 |
By :
Ming |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|