Students::field(['name'=>'name','email'=>'email']) error
A小卒过河
A小卒过河 2018-11-23 15:00:46
0
3
1369

Hello teacher, please tell me. Students::field(['name'=>'Name','email'=>'Email']) reports an error. The data expression name is not supported, but the English alias in it is not An error was reported, how to solve this?

A小卒过河
A小卒过河

reply all(1)
Peter-Zhu

What error is reported?

  • reply [0] Exception in Mysql.php line 145 不支持的数据表达式:姓名 $table = is_array($table) ? array_shift($table) : $table; } if (isset($alias[$table])) { $table = $alias[$table]; } } if ($strict && !preg_match('/^[\w\.\*]+$/', $key)) { throw new Exception('not support data:' . $key); } if ('*' != $key && ($strict || !preg_match('/[,\'\"\*\(\)`.\s]/', $key))) { $key = '`' . $key . '`'; } if (isset($table)) { if (strpos($table, '.')) { $table = str_replace('.', '`.`', $table);
    A小卒过河 author 2018-11-28 07:40:30
  • reply An error is reported saying that data expressions are not supported. If the name alias cannot be Chinese, there will be no problem. If the alias is in English, no error will be reported.
    A小卒过河 author 2018-11-28 07:42:02
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!