I'm using PHP but I think this question falls under MySQL.
I am querying a mysql database and pretty much putting all of the fields into an array. I need to narrow down the contents of the array by doing a calculation with two of the fields. For example field1 = 20 and field2 = 50. My input value is 30 and so since it falls between the value of field1 and field2, I want it to stay in the array. Anything that falls outside of field1 and field2, I want to delete. Is there a way to do this?
I am querying a mysql database and pretty much putting all of the fields into an array. I need to narrow down the contents of the array by doing a calculation with two of the fields. For example field1 = 20 and field2 = 50. My input value is 30 and so since it falls between the value of field1 and field2, I want it to stay in the array. Anything that falls outside of field1 and field2, I want to delete. Is there a way to do this?