I need to find the right query to get a value even if the data not exist in the db.
I have my table named "prova":
| it | en | de |
|---|---|---|
| data | data | |
| riga | row | linie |
| parola |
If I query:
SELECT en,de FROM `prova` WHERE `it` IN ("data","riga");
The resoult is:
| en | de |
|---|---|
| data | |
| row | linie |
And it's ok!
BUT
SELECT en,de FROM `prova` WHERE `it` IN ("data","riga","ciao","parola");
The resoult is:
| en | de |
|---|---|
| data | |
| row | linie |
Is as expected in the standard mysql but for me is a problem.
The the desired result is:
| en | de |
|---|---|
| data | not found |
| row | linie |
| not found | not found |
| not found | not found |
Why I want this?
I need to perform a query with an array of string, actually I need to query one by one string, and check if the query is empty. The size and the order of the resulted array should be equal to the given array.
Actually I need to perform 8700 queries, this will help me to decrease the queries number to 8.
Thanks