dqqvravff05370501 2017-08-09 16:30
浏览 238

phpmyadmin BUG:预计会有逗号或结束括号

My PHPMyAdmin always warn me

A comma or a closing bracket was expected

when I try to use a function.

Although it displays warnings, the SQL statements can be successfully executed.

For example ,here's a piece of SQL code

    INSERT INTO payments (`amount`,`alloted`, `dateadded`, `modified`, `userid`)
    VALUES ( 100, DATE_ADD( NOW(), INTERVAL 6 MONTH),NOW(),NOW(),139107 )

enter image description here

When typing the function 'NOW()', the red underline comes up, it's really, REAAALYYY annoying

Same errors come up when typing all kinds of sql functions

enter image description here

I've tried re-installing phpmyadmin but it doesn't work at all. This bug only occurs when I'm using ubuntu on my web server, the warning messages never comes up when I debuggling on localhost.

here's the common error message.

Error

Static analysis:

4 errors were found during analysis.

A comma or a closing bracket was expected (near "(" at position 40)
Unexpected token. (near "'123'" at position 41)
Unexpected token. (near ")" at position 46)
Unexpected token. (near ")" at position 47)

SQL query:

INSERT INTO accounts(pw) VALUES(PASSWORD('123'))
  • 写回答

2条回答 默认 最新

  • douhe6255 2017-08-09 16:58
    关注
    • What version of PHPMyAdmin are you running?
    • And with what version of MySQL?

    You probably need to post this on the PHPMyAdmin bugs repository.

    It is not a bug with the SQL processing itself; it is a bug with the new PhpMyAdmin SQL validator javasscript and its inferance of the structure of SQL queries.

    SQL can be very complex (part of its attraction) so it's to be expected that there will be cases where the validator gets confused.


    Also;

    INSERT INTO accounts(pw) VALUES(PASSWORD('123'))
    

    Should be:

    INSERT INTO accounts(`pw`) VALUES(PASSWORD('123'))
    

    note the backticks. PHPMyAdmin is extremely pernickerty that column names (and table names) be always backtick quoted.

    评论

报告相同问题?

悬赏问题

  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答