SQL查询末尾的PHP变量语句产生错误标志SQL方言 [英] PHP Variable Statement At End of SQL Query Produces Error Flag SQL Dialects

查看:171
本文介绍了SQL查询末尾的PHP变量语句产生错误标志SQL方言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的项目启用了SQL方言.我正在使用以下代码

I have SQL Dialects enabled for my project. I am using the below code

如果满足特定条件,则会设置一个PHP变量. SQL Dialects认为SQL语句的末尾有错误,因为它希望WHERE声明后有GROUP BY,HAVING或其他SQL声明.它在变量下划线,并且整个文件被标记为已知语法错误.我有办法在SQL方言中创建一个例外,因此将其忽略吗?

There is a PHP variable that is set if a certain condition is met. SQL Dialects thinks there is an error at the end of the SQL statement since it expects either a GROUP BY, HAVING, or other SQL declaration after the WHERE declaration. It underlines the variable and the entire file is marked as having known syntax errors. Is there a way for me to create an exception in SQL Dialects so this is ignored?

推荐答案

由数据库支持模块执行检查:

The inspection is performed by Database Support module:

  1. 对PHP变量一无所知;
  2. 从特定的方言角度来看,这不是有效的SQL(MySQL/SQL Server/其他).

您唯一的选择是ATM使用仅关键字" 作为SQL方言,其中仅提供基本的语法突出显示.

Your only choice ATM is to use "Keywords Only" as SQL Dialect where only basic syntax highlighting will be available.

除此之外:

  • http://youtrack.jetbrains.com/issue/WI-2450
  • http://youtrack.jetbrains.com/issue/WI-7594
  • somehow related http://youtrack.jetbrains.com/issue/WI-2324

这篇关于SQL查询末尾的PHP变量语句产生错误标志SQL方言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆