search

Home  >  Q&A  >  body text

Students::field(['name'=>'name','email'=>'email']) error

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小卒过河2183 days ago1429

reply all(3)I'll reply

  • 天蓬老师

    天蓬老师2018-11-27 21:39:45

    What error is reported?

    reply
    0
  • A小卒过河

    [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小卒过河 · 2018-11-28 07:40:30
    A小卒过河

    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小卒过河 · 2018-11-28 07:42:02
  • Cancelreply