سلام
این تابع رو جناب eshpilen نوشتن. عالیه...
function quote_smart($value, $identifier=false)
{
if(!is_numeric($value)) {
if(get_magic_quotes_gpc()) $value = stripslashes($value);
if(!$identifier) return "'" .mysql_real_escape_string($value) . "'";
else if(strpos($value, '`')===false) return '`' .$value . '`';
else {
$this->error("Value contains invalid character (backtick - '`') for identifiers");
return false;
}
}
else return $value;
}
فقط کافیه مقدیر رو بدن هیچ کوتیشنی ( " or ' ) بهش بدین





					
					
					
						
  پاسخ با نقل قول