oracle oci_execute() 错误信息
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1776590/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
oci_execute() error message
提问by monday.c
I get the below error message. What other compression function(other than SHA1) should use for oracle?
Warning: oci_execute() [function.oci-execute]: ORA-00904: "SHA1": invalid identifier in /user_auth_fns.php on line 2
我收到以下错误消息。oracle 应该使用哪些其他压缩函数(SHA1 除外)?
警告:oci_execute() [function.oci-execute]:ORA-00904:“SHA1”:第 2 行 /user_auth_fns.php 中的标识符无效
$result = oci_parse($conn, "select * from user where username='$username' and passwd = sha1('$password')");
$r = oci_execute($result);
if (!$r) {
$error = oci_error($conn);
echo "Could not log you in." . $error['message'];
exit;
回答by OMG Ponies
SHA1
is a PHP function, not Oracle. You need to use something like:
SHA1
是一个 PHP 函数,而不是 Oracle。你需要使用类似的东西:
AND passwd = '{sha1($password)}'