Now I put that SQL into a function. And when the function is called, it instead gave out "C", which also fulfilled the date and product_id requirement.
Is there a way I could get "A" no matter what? Hopefully without adding
extra WHERE clauses
Hello all.
I have an SQL command that is somewhere like
"SELECT value FROM table WHERE date = '2017-02-28' AND product_id = 100 LIMIT 1"
There are multiple rows if I don't use limit. But for convenience's sake, I'll say I get the value row to be "A"
Now I put that SQL into a function. And when the function is called, it instead gave out "C", which also fulfilled the date and product_id requirement.
Is there a way I could get "A" no matter what? Hopefully without adding extra WHERE clauses
Thank you.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 295 |
Nodes: | 16 (2 / 14) |
Uptime: | 07:46:03 |
Calls: | 6,642 |
Calls today: | 2 |
Files: | 12,190 |
Messages: | 5,326,102 |