Consider this simple Relation MyRel(A, B)
I wanted to display A based on value of B.
Here I would ask value of B from user. Is it possible in MySQL? How can I do it?
My query would be something like this SELECT A FROM MyRel WHERE B = [user_input].
Also Note that I am not using PHP or any other language with MySQL. I will execute this on Linux terminal.
If you are on the terminal anyway, why not write a little script around your functions and get the user input there, store it in variables and then send the mysql queries?
AFAIK there is no native method in MySQL that allows something like this, because SQL is there to query the data, not the user.
Small example: