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
553 * @param string $fieldName FieldName
554 * @param string $operatorName =,,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() 代替