Hello! I have a MySQL database and in it a table with 2 fields, fields of type int. There can not be several records with the same first and second field. I have an array of numbers m. I need to get the value of the first field, whose value in the second field more closely matches the numbers in the array, something like that.
I mean, I have a table:
param1 param2 1 111 2 111 2 222 2 444 3 222 3 555 And the array:
111 222 333 I need to get the number 2 from the table. I would be very grateful for the help.