duanbei7005 2016-04-11 22:29
浏览 50
已采纳

语法错误Sql / PHP

I am trying to make pagination in PHP using SQL, the pagination logic is not the problem or anything, the problem is that I am not getting my table and rows printed, I decided to echo the sql sentence and try it directly into the sql program, and it gives me a syntax error which I don't understand because it seems just as good as the examples I have seen.

The thing is that I don't get why is that error I'm getting and why is it wrong or why the LIMIT is not getting accepted.

This is the sql sentence I'm echoing, (seems pretty good to me):

This is the sql sentence I'm echoing, (seems pretty good to me)

This is the error I'm getting (and which I'm guessing is the problem why my table isnt printing):

enter image description here

  • 写回答

1条回答 默认 最新

  • douduan4116 2016-04-11 22:39
    关注

    Try to use SQL Server syntax, like:

    SELECT TOP 20 * FROM trArchivos_test WHERE idArticulo=1 AND idFraccion=1
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 gwas 分析-数据质控之过滤稀有突变中出现的问题
  • ¥15 没有注册类 (异常来自 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
  • ¥15 知识蒸馏实战博客问题
  • ¥15 用PLC设计纸袋糊底机送料系统
  • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
  • ¥15 用C语言输入方程怎么
  • ¥15 网站显示不安全连接问题
  • ¥15 51单片机显示器问题
  • ¥20 关于#qt#的问题:Qt代码的移植问题
  • ¥50 求图像处理的matlab方案