here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this php oci_execute site About Us Learn more about Stack Overflow the company Business Learn more
Oci_execute Return Value
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x php oci_fetch_array Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up oci_execute() error https://docs.oracle.com/cd/E17781_01/appdev.112/e18555/ch_seven_error.htm message up vote -1 down vote favorite 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." . http://stackoverflow.com/questions/1776590/oci-execute-error-message $error['message']; exit; php sql oracle ora-00904 share|improve this question edited Sep 19 '10 at 5:22 OMG Ponies 198k36356415 asked Nov 21 '09 at 20:01 monday.c 1337 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted SHA1 is a PHP function, not Oracle. You need to use something like: AND passwd = '{sha1($password)}' share|improve this answer answered Nov 21 '09 at 20:08 OMG Ponies 198k36356415 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged php sql oracle ora-00904 or ask your own question. asked 6 years ago viewed 5734 times active 6 years ago Related -1oci_parse error message0Don't PHP strings like multiple variable insertions?0Oracle SQL Error: How to Debug this issue-1Oracle SQL help5Hibernate native SQL error0Getting Error Message For oci_execute() Error (PHP)2oci_execute(): OCI_SUCCESS_WITH_INFO: ORA-24344 using a trigger/sequence to auto
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring http://stackoverflow.com/questions/5789737/how-to-catch-in-php-oracle-grace-period-message developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join https://www.techonthenet.com/oracle/exceptions/when_others.php them; it only takes a minute: Sign up how to catch in PHP oracle grace period message? up vote 2 down vote favorite 1 I use an Oracle database in a PHP application. A user tries to connect to error handling the PHP application. His password has expired, but the grace period for his user's profile isn't null, so he can still connect to the application. What I would like to do is recognize that this user should change his password and display him a message. I've tried with oci_error(), but it doesn't return anything as there were no failure in connecting to the database with this user. I would like to catch ORA-28001 (and ORA-28002) Unfortunately, I can't do capturar error oracle any change of structure in the database itself (add extra table or extra field). php oracle ora-28002 share|improve this question edited Jan 17 '12 at 6:18 OMG Ponies 198k36356415 asked Apr 26 '11 at 11:38 Cedric 1,85321535 Any other idea / clues / solution ? –Cedric Apr 27 '11 at 15:30 oci_error() can also be used to catch the ORA-28002 message. But error_get_last doesn't seem to work. Using a custom error handler does the trick as well (see Narf's and CJ's comments). Thank you very much ! –Cedric May 6 '11 at 14:48 add a comment| 3 Answers 3 active oldest votes up vote 1 down vote accepted Expanding Narf's answer, this works for me with Oracle 11.2 Its output for a password in the grace period is: Your password will expire within 1 days Connected OK Query is OK share|improve this answer answered Apr 27 '11 at 23:22 C
Server MySQL MariaDB PostgreSQL SQLite MS Office Excel Access Word Web Development HTML CSS Color Picker Languages C Language More ASCII Table Linux UNIX Java Clipart Techie Humor Advertisement Oracle Basics Oracle Advanced Oracle Cursors Oracle Exception Handling Named Programmer-Defined Exception Named System Exception WHEN OTHERS Clause SQLCODE SQLERRM Oracle Foreign Keys Oracle Loops/Conditionals Oracle Transactions Oracle Triggers String/Char Functions Numeric/Math Functions Date/Time Functions Conversion Functions Analytic Functions Advanced Functions NEXT: SQLCODE Oracle / PLSQL: WHEN OTHERS Clause This Oracle tutorial explains how to use the Oracle WHEN OTHERS clause with syntax and examples. What is the WHEN OTHERS clause in Oracle? The WHEN OTHERS clause is used to trap all remaining exceptions that have not been handled by your Named System Exceptions and Named Programmer-Defined Exceptions. Syntax We will take a look at the syntax for the WHEN OTHERS clause in both procedures and functions. Syntax for Procedures The syntax for the WHEN OTHERS clause in a procedure is: CREATE [OR REPLACE] PROCEDURE procedure_name [ (parameter [,parameter]) ] IS [declaration_section] BEGIN executable_section EXCEPTION WHEN exception_name1 THEN [statements] WHEN exception_name2 THEN [statements] WHEN exception_name_n THEN [statements] WHEN OTHERS THEN [statements] END [procedure_name]; Syntax for Functions The syntax for the WHEN OTHERS clause in a function is: CREATE [OR REPLACE] FUNCTION function_name [ (parameter [,parameter]) ] RETURN return_datatype IS | AS [declaration_section] BEGIN executable_section EXCEPTION WHEN exception_name1 THEN [statements] WHEN exception_name2 THEN [statements] WHEN exception_name_n THEN [statements] WHEN OTHERS THEN [statements] END [function_nam