form mysql query in php -
i've got following queries need execute in php. problem need set queries before execution of main query. set queries
set @center = geomfromtext('point(33.3666667 35.1666667)'); set @radius = 1; set @bbox = concat('polygon((', x(@center) - @radius, ' ', y(@center) - @radius, ',', x(@center) + @radius, ' ', y(@center) - @radius, ',', x(@center) + @radius, ' ', y(@center) + @radius, ',', x(@center) - @radius, ' ', y(@center) + @radius, ',', x(@center) - @radius, ' ', y(@center) - @radius, '))' ); and main query
select users_profile.id, glength(linestring(users_profile.location,geomfromtext('point(33.3666667 35.1666667)'))) * 100 distance users_profile intersects( users_profile.location, geomfromtext(@bbox)) , (glength(linestring(users_profile.location,geomfromtext('point(33.3666667 35.1666667)'))) * 100) < 10 order distance how can execute in php? cannot 4 different queries nor can in 1
i don't think can execute first query that. try writing 1 stored procedure , calling php.
Comments
Post a Comment