gpt4 book ai didi

javascript - sqlite 查询返回错误 - 无法找出原因

转载 作者:行者123 更新时间:2023-11-28 02:43:37 24 4
gpt4 key购买 nike

不确定这是 sqlite 中自定义函数的副作用,但我试图使用查询来驱动表单。 (这是一个粗略的演示 http://www.thisisstaffordshire.co.uk/images/localpeople/ugc-images/275796/binaries/GPformMap4.html )

一个小问题是,如果我使用某些术语进行查询,查询将返回数据:

https://api.scraperwiki.com/api/1.0/datastore/sqlite?format=htmltable&name=geoutil&apikey=a083014f-1103-47ee-86aa-e30db4aa4762&query=select%20distance(Latitude%2C%20Longitude%2C%2052.951458%2C%20-2.032748)%20as%20distance%2C%20*%20from%20%60swdata%60%20where%20electronic_prescription%20%3D%20%22Yes%22%20and%20early_appointments%20like%20%22%258%25%22%20order%20by%20distance%20asc%20limit%2010

但其他不包含 electronics_prescription 标签的情况则不包含并返回以下错误:

{u'error': u'sqliteexecute: sqlite3.Error: 用户定义函数引发异常'}

https://api.scraperwiki.com/api/1.0/datastore/sqlite?format=htmltable&name=geoutil&apikey=a083014f-1103-47ee-86aa-e30db4aa4762&query=select%20distance%28Latitude%2C%20Longitude%2C%2052.951458%2C%20-2.032748%29%20as%20distance%2C%20*%20from%20%60swdata%60%20where%20early_appointments%20like%20%22%258%25%22%20order%20by%20distance%20asc%20limit%2010

我认为问题在于使用自定义函数返回基于两个纬度/经度定义点的距离时出现的错误。

我做错了什么?更重要的是,它容易修复吗?

最佳答案

David Jones 在 ScraperWiki 电子邮件列表中回答了这个问题。您可以在这里阅读答案:

https://groups.google.com/forum/?fromgroups=#!topic/scraperwiki/Rh6qkNHiRjI

关于javascript - sqlite 查询返回错误 - 无法找出原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12264303/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com