mySQL query error: SELECT hash('SHA512', ( CONCAT( lang_id, '-', word_app, '-', word_pack, '-', word_key ) ) as word_lookup, word_id, hash('SHA512', word_default) as word_default, word_default_version FROM forum_core_sys_lang_words WHERE word_app='core' AND lang_id IN(1)
SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('SHA512', ( CONCAT( lang_id, '-', word_app, '-', word_pack, '-', word_key ) ) a' at line 1
SQL error code: 1064
Date: Thursday 18th July 2013 03:34:35 PM
我正在使用 IPBoard 论坛,我决定不使用 MD5,而是使用 SHA512。我正在使用记事本++,所以我只是将 ALL 重命名md5(
为hash('SHA512',
.
安装后,我收到此 SQL 错误。
这是否意味着 SQL 查询不支持 hash()?我该如何解决?
$this->DB->build( array( 'select' => "hash('SHA512', ( CONCAT( lang_id, '-', word_app, '-', word_pack, '-', word_key ) ) as word_lookup, word_id, hash('SHA512', word_default) as word_default, word_default_version",
'from' => 'core_sys_lang_words',
'where' => "word_app='{$app_override}' AND lang_id IN(" . implode( ",", $lang_ids ) . ")" ) );
$this->DB->execute();