All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

php error on low search distance

jelle dijkstra 27 Sep 2018 14:36 problem,

Hi Low,
I'm getting a php error that is either because of low search or gmap by reinos.
ee 3.5.15 / LS 5.2.0

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[object Object] ORDER BY 'distance' asc' at line 6:
SELECT entry_id, (6371 * acos(cos(radians(52.340990)) * cos(radians(field_id_345)) * cos(radians(field_id_346) - radians(4.797390)) + sin(radians(52.340990)) * sin(radians(field_id_345)))) AS distance FROM ('exp_channel_data') WHERE (field_id_345 OR field_id_346) AND 'site_id' IN (1) AND 'entry_id' IN (3671, 3675, 3689, 3692, 3724, 3725, 3727, 3729, 3734, 3737, 3760, 3762, 3768, 4146, 4147, 4148, 4157, 4168, 4180, 4182, 4197, 4205, 4206, 4223, 4224, 4225, 4226, 4228, 4231, 4233, 4235, 4237, 4238, 4248, 4250, 4253, 4254, 4257, 4398, 4542, 4544, 4547, 4553, 4556, 4557, 4577, 4578, 4580, 4582, 4584, 4585, 4586, 4587, 4611, 4612, 4615, 4665, 4667, 4668, 4698, 4699, 4701, 4706, 4711, 4713, 4726, 4732, 4735, 4737, 4739, 4740, 4748, 4751, 4753, 4763, 4766) HAVING 'distance' query('SELECT entry_id...')
#1 ee/legacy/database/DB_driver.php(297): CI_DB_mysqli_driver->_execute('SELECT entry_id...')
#2 ee/legacy/database/DB_driver.php(203): CI_DB_driver->simple_query('SELECT entry_id...')
#3 ee/legacy/database/DB_active_rec.php(1219): CI_DB_driver->query('SELECT entry_id...')
#4 user/addons/low_search/filters/distance/lsf.distance.php(200): CI_DB_active_record->get()
#5 user/addons/low_search/libraries/Low_search_filters.php(153): Low_search_filter_distance->filter(Array)
#6 user/addons/low_search/mod.low_search.php(780): Low_search_filters->filter()
#7 ee/legacy/libraries/Template.php(1712): Low_search->results()

  • {nickname} {created_at format="%j %M %Y %H:%i"}

    {formatted_content}