Question: So I have set up a mysql database that holds an image (more specifically a path to an image) and the images rank (starting at 0). I then created a web page that displays two images at random at a time. [Up till here everything works fine] I want my users to be able to click on one of the images that they like better and for that images rank to increase by +1 in the database.

How would I set that up? Please be as detailed as possible in your explanation. I am new to php and mysql.

Answer: 
Well i wasn't able to solve why the Between function didn't work - but mysql doesn't allow BETWEEN on floating point numbers either. So i'm going to assume that it's a similar reason. 

I changed my code to merely create it's own between statement. 

```
    NSPredicate *longPredicate = nil;
    NSPredicate *latPredicate = nil;
    if ([neCoordLong floatValue] > [swCoordLong floatValue])
    {
        longPredicate = [NSPredicate predicateWithFormat: @" longitude <= %@ AND longitude >= %@", neCoordLong, swCoordLong];
    }else {
        longPredicate = [NSPredicate predicateWithFormat: @" longitude <= %@ AND longitude >= %@", swCoordLong, neCoordLong];
    }
    if ([neCoordLat floatValue] > [swCoordLat floatValue])
    {
        latPredicate = [NSPredicate predicateWithFormat: @" latitude <= %@ AND latitude >= %@", neCoordLat, swCoordLat];
    }else {
        latPredicate = [NSPredicate predicateWithFormat: @" latitude <= %@ AND latitude >= %@", swCoordLat, neCoordLat];
    }

```

Hopefully this helps someone else
I had a similar error as well. I am pretty sure it is a very low level database related issue. Here is some more information I have - 

a. With a inmemory database, I could run a test case with exactly the same data just fine.
b. When I got the error "-[\_\_NSCFNumber constantValue]: unrecognized selector sent to instance 0xa9e4ca0". I did 

```
(lldb) po 0xa9e4ca0
 $0 = 178146464 -96.24999189101783

```

Not sure where 178146464 coming from. I will try the manual "between" now.