raj_2006
01-08-2007, 07:13 AM
Hi all,
I have a field in job_list table that is salary whose datatype is varchar(100)
Now the data in the job_list table are:
salary
10,000
20,000
30,000
40,000
50,000
Now my sql is very simple
$sql="select * from job_list where salary>=10,000 and salary<=50,000";
If i run this query then zero rows are found but if i do this
$sql="select * from job_list where salary>=10,000 and salary<=40,000";
then "4 rows found"
Why the 5th row is not displaying if i select max and min salary.I could found any solid logic behind it but this is very much strange.
Please suggest me......Thanks....Raj
I have a field in job_list table that is salary whose datatype is varchar(100)
Now the data in the job_list table are:
salary
10,000
20,000
30,000
40,000
50,000
Now my sql is very simple
$sql="select * from job_list where salary>=10,000 and salary<=50,000";
If i run this query then zero rows are found but if i do this
$sql="select * from job_list where salary>=10,000 and salary<=40,000";
then "4 rows found"
Why the 5th row is not displaying if i select max and min salary.I could found any solid logic behind it but this is very much strange.
Please suggest me......Thanks....Raj