我如何修复SQL错误 [英] How I can fix SQL error

查看:115
本文介绍了我如何修复SQL错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 adsun.vn [ ^ ]网站有一个禁用(隐藏)产品,但当我输入网址时(见产品): http://adsun.vn/san-pham/thiet-bi-dinh-vi-o-to-tmst90-865.html [<一个href =http://adsun.vn/san-pham/thiet-bi-dinh-vi-o-to-tmst90-865.html\"target =_ blanktitle =新窗口> ^ ]



此警告语法错误:从table_product中选择*,其中hienthi = 1且id<>'865'和id_list =按stt,ngaytao desc排序 。我如何解决这个错误(可以查看产品)



我尝试过:



如何修复此错误(可以在禁用产品时查看产品)

My adsun.vn[^] website has a disable (hide) product but when i type url site (see product): http://adsun.vn/san-pham/thiet-bi-dinh-vi-o-to-tmst90-865.html[^]

This alert "syntax error: select * from table_product where hienthi=1 and id <>'865' and id_list= order by stt,ngaytao desc". How i can fix this error (Can view product)

What I have tried:

How i can fix this error (Can view product when product is disable)

推荐答案

Quote:

select * from table_product,其中hienthi = 1,id<>'865'和id_list = order by stt,ngaytao desc

select * from table_product where hienthi=1 and id <>'865' and id_list= order by stt,ngaytao desc





您必须为 id_list 提供



查询应该像





you have to provide a value for id_list

the query should be like

select * from table_product where hienthi=1 and id <>'865' and id_list='yourdata' order by stt,ngaytao desc


你已经得到了答案。

这是帮助看的链接在未格式化的SQL查询中有什么问题,它们是SQL美化器:

SQLFormat - 在线SQL格式化程序 [ ^ ]

即时SQL格式化程序 [ ^ ]
You already got the answer.
Here is links to help see what is wrong in unformatted SQL queries, they are SQL beautifiers:
SQLFormat - Online SQL Formatter[^]
Instant SQL Formatter[^]


嗨朋友,





Hi Friend,


You did one mistake because you did not assign any value for "id_list=" so getting error.


这篇关于我如何修复SQL错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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