Hi guys, I'be got a bit of a problem when I'm trying to do a select query on my table using predefined variables, it's a bit of a strange one.
The code for the statement is as follows:
$query3 = mysql_query("SELECT Pcode FROM postcodes WHERE Grid_N >= '$min_gridn' AND Grid_N <='$max_gridn'");
The problem is with the variable named $min_gridn. When this value is under 100,000 then nothing is selected. However, if I type into the query the actual value e.g. 99,999 where '$min_gridn' is currently, some records are returned. Anything where the variable is 100,000 or over returns fine....
Please help if you have any idea what is going on!!
Thanks 🙂