WHERE的sql问题('field'<> value)(sql problem with WHERE ('field' <> value))
我有两个sql查询,一个检索给定主题id的所有事件记录,另一个检索除了给定主题id之外的所有事件记录,但没有。
第一个查询检索正确的记录
SELECT `events`.* FROM `events` INNER JOIN events_topics ON events.id = events_topics.event_id WHERE (events_topics.topic_id = 75)
应该排除事件的第二个查询不排除任何。
SELECT `events`.* FROM `events` INNER JOIN events_topics ON events.id = events_topics.event_id WHERE (events_topics.topic_id <> 75)
I have two sql queries, one which retrieves all the Event records for a given topic id and another which is supposed to retrieve all Event records excluding given topic id, but doesn't.
The first query retrieves the correct records
SELECT `events`.* FROM `events` INNER JOIN events_topics ON events.id = events_topics.event_id WHERE (events_topics.topic_id = 75)
The second query which is supposed to exclude events does not exclude any.
SELECT `events`.* FROM `events` INNER JOIN events_topics ON events.id = events_topics.event_id WHERE (events_topics.topic_id <> 75)
原文:https://stackoverflow.com/questions/6484129
更新时间:2023-12-04 12:12
最满意答案
输入结算明细后再试一次。 在API接受您的API密钥之前,您需要这样做。
Give it another try after entering your billing details. You need to do that before the API will accept your API key.
相关问答
更多-
如何从Google Translate API v2 php获得翻译?(How get translation from Google Translate API v2 php?)[2022-08-04]
看起来图书馆坏了。 您可以使用它来获取翻译! $client = new Google_Client(); $client->setDeveloperKey('xxxx-your-dev-key-xxxx'); $translate = new Google_Service_Translate($client); $translations = $translate->translations->listTranslations('Hello world!', 'fr'); var_dump($t ... -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
好吧,您可以为要翻译的每个元素创建一个“新”回调函数,并在完成后删除该函数。 即:像: function translateElement(elementID) { var element = document.getElementsById(elementID); // this is a temporary function for updating this particular element window['translate'+elementID] = functio ...
-
输入结算明细后再试一次。 在API接受您的API密钥之前,您需要这样做。 Give it another try after entering your billing details. You need to do that before the API will accept your API key.
-
我终于发现了,所以我会回答我自己的问题。 可以在左侧菜单中的配额部分下的API( https://code.google.com/apis/console )的管理面板中设置API的速率限制。 我没有找到API可能返回的错误的完整文档。 I finally found out so I will answer my own question. The rate limit for the API can be set at the admin panel for your API's (https://co ...
-
Google地图上的Fusion Tables v2 POI:Android示例?(Fusion Tables v2 POIs on Google Maps: Android example?)[2024-03-11]
在Android网络调用永远不会在UI /主线程上进行。 如果您只是想要查看正在运行的项目,或者尝试使用异步任务,或者在开发完整项目时导入像volley / robospice这样的网络库。 This commit implements the fusion tables query and shows the resulting POIs on google maps Explanation: GoogleAccountCredential was wrong and had to be replaced ... -
Google API v2无效(Google API v2 Not Work)[2023-09-07]
在我看来,带有API密钥的meta-data标签应该放在application部分中。 你的就在它的外面。 我在之前的两个项目中使用了Maps v2,并在application XML元素中添加了API密钥。 It seems to me that the meta-data tag with the API key should be placed inside the application section. Yours is placed just outside it. I've used Maps ... -
您可以看到以下链接。 它包含API文档和一些示例代码,它为您提供了一些想法。 Api文档: https : //cloud.google.com/translate/v2/getting_started , API资源管理器(你可以在那里获取价值并试验它需要什么样的价值): https : //developers.google.com/apis-explorer/?hl = en_US#p / translate / v2 / , 如何使用谷歌翻译API与c ++ http://ubuntuforums. ...
-
功能方面,这些版本或多或少相同。 但是,对于新开发,强烈建议使用v3 这是生产质量。 规则一:对于新开发项目,始终使用最新的生产质量版本 简化了v3 API,有关详细信息,请参阅此视频 ,以便更轻松地使用 对于多种方法,v3 API 要快得多(最多3次) Feature wise these version are more or less the same. However, for new development v3 is recommended strongly It is production q ...
-
您需要使用URL编码器对参数进行编码 String params = "pointC|pointD"; try { params = URLEncoder.encode(params, "UTF-8"); } catch (UnsupportedEncodingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } 然后结束 String url = "http://maps.goog ...