Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Stan Cook
April 12, 2005, 12:49 am
rate this thread
Re: user input
Stan Cook wrote:
If you mean something like the Oracle "&" prompt for user input in
SQL*Plus, I don't think the MySQL command-line interface has that feature.
You need to do this in some kind of application code. Prompt the user
for input using your favorite programming language, use their input
while constructing a SQL query, then execute that query.
Example in Bourne shell:
echo -n "Enter a value: "
mysql mydatabase -e "select * from mytable where myfield = '$value';'
(nb: example not tested)
- » Can i replace the files MYI MYD and FRM to update a database?
- — Previous thread in » MySQL Database Forum
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum