What is the syntax for parameter query in mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • almaroc
    New Member
    • Nov 2011
    • 48

    What is the syntax for parameter query in mysql

    my question is basically how to pass a parameter to a query in mysql. lets say i have a table with empno and empname and i want to select the empno based on the empname entered by the user. something like
    Code:
    select empno from mytable
    where empname=[enter employee name];
    i know this will work in access but in mysql it give me syntax error.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You should post this in the MySQL forum.

    Comment

    Working...