views:

299

answers:

1

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


$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;
A: 

SHA1 is a PHP function, not Oracle. You need to use something like:

AND passwd = '{sha1($password)}'
OMG Ponies