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 高价求中通快递查询接口
  • ¥15 解决一个加好友限制问题 或者有好的方案
  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?