Heim  >  Fragen und Antworten  >  Hauptteil

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

Hallo Lehrer, bitte teilen Sie mir den von Students::field(['name'=>'name','email'=>'email']) gemeldeten Fehler mit. Der Name des Datenausdrucks wird nicht unterstützt, aber der Der darin enthaltene englische Alias ​​meldet keinen Fehler. Wie kann man das beheben?

A小卒过河A小卒过河2127 Tage vor1381

Antworte allen(3)Ich werde antworten

  • 天蓬老师

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

    报什么错呢?

    Antwort
    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小卒过河

    报错说不支持数据表达式,姓名别名不起中文的就没问题,英文别名不报错。

    A小卒过河 · 2018-11-28 07:42:02
  • StornierenAntwort