我如何修复SQL错误
我的 adsun.vn [ ^ ]网站有一个禁用(隐藏)产品,但当我输入网址时(见产品): http://adsun.vn/san-pham/thiet-bi-dinh-vi-o-to-tmst90-865.html [ ^ ]
此警告语法错误:从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)
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.