2

I am developing an Oracle ADF web application using jDeveloper. For that am using

  • jDeveloper
  • MySql database
  • Integrated WebLogic (which came with jDeveloper)

So am trying to Create a Query-only Business Service Based on Parameters. For this I need to create a query which will take values at run time.

I am following a tutorial in that they gave(because tutorial followed oracle) oracle equivalent query

select first_name,last_name from employees where email=:p_mail

But I need mysql query equivalent to the above (because I am following MySql DB).

3
  • stackoverflow.com/questions/23178816/… might help. Commented Dec 24, 2014 at 7:28
  • the above link talking about stored procedure. But am not dealing with stored procedure. In orcale ADF app am creating Business service Based on parameters. Whenever I entered into a window the above query I am getting the following error Commented Dec 24, 2014 at 7:59
  • com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 ':p_email' at line 1 Commented Dec 24, 2014 at 8:04

1 Answer 1

0

Same as Oracle your query will be :

$show_list = $bdd->prepare("SELECT first_name, last_name FROM employees WHERE email = :p_mail");
$show_list->execute(Array(':p_mail' => $user_email));
$show_list->fetchAll();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.