473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

What is the syntax for parameter query in mysql

48
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
Expand|Select|Wrap|Line Numbers
  1. select empno from mytable
  2. where empname=[enter employee name];
  3.  
i know this will work in access but in mysql it give me syntax error.
Jan 20 '12 #1
1 2153
Rabbit
12,516 Expert Mod 8TB
You should post this in the MySQL forum.
Jan 20 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John Jayaseelan | last post by:
Hi, The following parameter query resulted the error below. Is the following syntax correct? select * from branch where branch_code = ? COUNT field incorrect or syntax error
2
by: John Jayaseelan | last post by:
Hi, The following parameter query SQL statement on a sql analyzer gives the error message given below. Select * from contact where cus_cust_no = ? COUNT field incorrect or syntax error
2
by: Betrock | last post by:
This is probably very simple, but I just can't see my way thru it..... Short version: keyed values(numeric)in a lookup table are stored in a main table. They are displayed as text values - the...
1
by: Cory | last post by:
When I run the subroutine testEmailContacts the msgbox says that there is only 1 record. The sql for qyEmailContactsQyCard is below. There is over 3000 records in the table "tbl:Contact". What am i...
1
by: carrionk | last post by:
Hi, I have created a Subform which SourceObject is a parameter query. This is the Query: Qry Name:80IsscomProduct SELECT * FROM Isscomp28 WHERE Like ;
1
by: Bill | last post by:
Hi, Our database is Access (i know, i would be better to use Mysql, but at the present time, it's access ...) and i created a parameter query (like a stored procedure in Mysql) for...
5
by: vinfurnier | last post by:
Hi - I've been struggling to produce a working parameter query that will allow the end user to type in any date (mm/dd/yy) and obtain the records of the previous 2 days. In other words, if the...
1
by: jmarr02s | last post by:
When I double click on my form..I get a Parameter Query box. How can I turn this off?! I went to properties, but did not see anything that would help remove this. I also deleted the query...
3
by: limperger | last post by:
Hello everyone: This question is neither urgent nor important, but I post it just in case anyone knows (and wants to give a reply, of course XD). I have little idea of VBA, but I have dared to...
4
by: chicane | last post by:
I am currently writing a query in Access. I need to set up a parameter query for three fields which are called Status (text field), Authorised (date field) and Legal notices (date field). I need...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.