首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > PHP >

bugfree登陆报错,php错

2012-10-15 
bugfree登陆报错,php错。求助HP Errormysql_escape_string(): This function is deprecated use mysql_rea

bugfree登陆报错,php错。求助
HP Error
mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. 

C:\xampp\htdocs\bugfree\protected\service\SqlService.php(563)

551 *
552 * @author Yupeng Lee<leeyupeng@gmail.com>
553 * @param string $fieldName FieldName
554 * @param string $operatorName =,<,>,<= eg.
555 * @param string $fieldValue FieldValue
556 * @return string Query string for SQL
557 */
558 private static function baseGetFieldQueryStr($searchFieldConfig, $type, $fieldName, $operatorName, $fieldValue)
559 {
560 $basicTableName = '{{' . $type . 'view}}';
561 $fieldValue = trim($fieldValue);
562 
563 $fieldValue = mysql_escape_string($fieldValue);
564 //handle search value %
565 $fieldValue = str_replace('%', '\%', $fieldValue);
566 // $fieldValue = str_replace('_', '\_', $fieldValue);
567 
568 $queryStr = '';
569 if($fieldValue == '')
570 {
571 return $queryStr;
572 }
573 elseif(Info::MARK == $fieldName)
574 {
575 $inOrNotIn = ' not in ';
Stack Trace
#0 +– C:\xampp\htdocs\bugfree\protected\service\SqlService.php(563): mysql_escape_string("Sample Product") 
558 private static function baseGetFieldQueryStr($searchFieldConfig, $type, $fieldName, $operatorName, $fieldValue)
559 {
560 $basicTableName = '{{' . $type . 'view}}';
561 $fieldValue = trim($fieldValue);

[解决办法]
mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead
mysql_escape_string() 函数已废弃,用 mysql_real_escape_string() 代替

热点排行