Unable to restore all points using mysql point type query

I am stuck in a problem using spatial data point in mysql. I have one table called "tasks" in mysql where I store the following information.

Id Int (11) Primary key
Name Varchar (50) 
Street Varchar (50) 
City Varchar (50) 
Province Varchar (50) 
Country Varchar (50) 
Lat decimal (15,12)  
Long decimal (15,12)  
latlong point   

And the following are examples of data.

  INSERT INTO `tasks` 
   (`id`, `name`, `street `, `city`, `province`, `postalCode`, `lat`, `lng`, `latLong`) VALUES
   (202, 'task1', ' sursagar ', 'vadodara', 'Gujarat', 'India', 22.301887300000, 73.205468800000, 0x0000000001010000006288d349364e5240cfbf5df6eb4c3640),
   (203, 'task2', ' madvi ', 'vadodara', 'Gujarat', 'India', 22.302665500000, 73.204284700000, 0x000000000101000000af642200134d5240a320787c7b4d3640),
   (204, 'task3', 'panigat ', 'vadodara', 'Gujarat', 'India', 22.300475500000, 73.222063499999, 0x00000000010100000047e7fc14c74d5240795be9b5d94c3640),
   (229, 'taks4', 'Akota Stadium Road', 'Vadodara', 'Gujarat', 'India', 22.297802300000, 73.166531300000, 0x000000000101000000aad0e572a84a5240702c83c53c4c3640);

iPhone, 2 lat, lng, , , . . 2 lat, lng, , . A: 22.327847, 73.172894 B: 22.272259, 73.227825

Google Maps .

enter image description here

.

     SELECT `task`.* 
     FROM `tasks` AS `task` 
     WHERE `task`.`isDeleted` = '0' 
     AND MBRContains(GeomFromText('Polygon((73.172894 22.327847), (73.227825 22.272259))'),latLong) 
     ORDER BY task.created DESC  

A B. , , . . ?

- ?

+4
1

doc

 SELECT `task`.* 
 FROM `tasks` AS `task` 
 WHERE `task`.`isDeleted` = '0' 
 AND MBRContains(GeomFromText('Polygon((73.172894 22.327847, 73.227825 22.272259))'),latLong) 
 ORDER BY task.created DESC  

, !

0

All Articles