帮我数据库msql错误 [英] Help me database msql error

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

问题描述

错误
无法执行查询[从ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID =``1002''中选择NO_OF_ADS_AT_A_TIME]-未知的字段字段列表"中的列"NO_OF_ADS_AT_A_TIME"


 I ' 已创建一个名称为"ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID"的表,其值= 1002
和colom"NO_OF_ADS_AT_A_TIME"相同的错误
是否还有其他解决方案 



:confused :: confused:

我的网站

登录

http://www.ads.pcboxsearch.com/browse.php [ http://pcboxsearch.com/1.JPG [ http://pcboxsearch.com/2.JPG [ http://pcboxsearch.com/3.JPG [解决方案

ariodoni写道:

我已经创建了一个名称为"ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID"的表



如果"ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID在哪里"是您的表名,那么您需要考虑一个新的更好的名称.


昨天,当客户将名称中带有空格的东西递给我时,我在想我有多少不喜欢名字中的空格.即使它们是合法的,当软件尝试解析它们时,它们也会引起各种有趣的事件.

根据您的1.jpg,您确实确实有一个名为"ADQUICK_USER_AD_PREFERENCES"的表和另一个名为"ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID的表".

这导致您的代码不合适,并且可能会激发将来的维护程序员(可能包括您自己)将您赶出场.您选择的某些单词甚至比空格更糟糕,因为该名称看起来像一个SQL片段.

您的3.jpg显示了"ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID"中的字段,但没有提供"ADQUICK_USER_AD_PREFERENCES"的详细信息.另外,我们不知道您的实际目标.


ariodoni写道:

[从ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID ="1002"中选择NO_OF_ADS_AT_A_TIME]



这将在WEBSITE_ID为"1002"的"ADQUICK_USER_AD_PREFERENCES"中查找所有元组,并从这些元组返回NO_OF_ADS_AT_A_TIME.它对您的表"ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID"没有任何作用.


ariodoni写道:

错误
无法执行查询[从ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID =``1002''中选择NO_OF_ADS_AT_A_TIME]-未知的字段字段列表"中的列"NO_OF_ADS_AT_A_TIME"



这就是说,它们不是表"ADQUICK_USER_AD_PREFERENCES"中称为NO_OF_ADS_AT_A_TIME的字段.我想这是真的.

请更改您的"ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID"表的名称.然后在其上运行查询,或基于表中实际包含的字段在"ADQUICK_USER_AD_PREFERENCES"上运行查询.


error
Could not execute query [Select NO_OF_ADS_AT_A_TIME from ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID = ''1002''] - Unknown column ''NO_OF_ADS_AT_A_TIME'' in ''field list''t''


I've created a table with the name "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID" value = 1002
and colom "NO_OF_ADS_AT_A_TIME" same error
whether there is another solution



:confused::confused:

my site

login

http://www.ads.pcboxsearch.com/browse.php[^]

http://pcboxsearch.com/1.JPG[^]
http://pcboxsearch.com/2.JPG[^]
http://pcboxsearch.com/3.JPG[^]

解决方案

ariodoni wrote:

I''ve created a table with the name "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID"



if "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID" is your tablename, then you need to think of a new and better name.


Just yesterday as a client handed me stuff with spaces in the names, I was thinking how much I dislike spaces in names. Even when they are legal, they can cause all sorts of interesting occurrences when software tries to parse them.

According to your 1.jpg you really do have both a table called "ADQUICK_USER_AD_PREFERENCES" and another one called "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID."

This is causing your code fits, and could inspire future maintenance programmers (possibly including yourself) to cuss you out. Some of the words you''ve chosen are even worse than spaces, as this name looks like an SQL fragment.

Your 3.jpg shows the fields in "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID", but you don''t provide the detail for "ADQUICK_USER_AD_PREFERENCES." Also, we don''t know your actual goal.


ariodoni wrote:

[Select NO_OF_ADS_AT_A_TIME from ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID = ''1002'']



This is looking for all tuples in "ADQUICK_USER_AD_PREFERENCES" with a WEBSITE_ID of ''1002'' and returning NO_OF_ADS_AT_A_TIME from those tuples. It isn''t doing anything with your table "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID."


ariodoni wrote:

error
Could not execute query [Select NO_OF_ADS_AT_A_TIME from ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID = ''1002''] - Unknown column ''NO_OF_ADS_AT_A_TIME'' in ''field list''t''



This is saying that their is no field called NO_OF_ADS_AT_A_TIME in the table "ADQUICK_USER_AD_PREFERENCES". I presume this is true.

Please change the name of your "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID" table. Then run your query on it, or run a query on "ADQUICK_USER_AD_PREFERENCES" based on fields actually contained in the table. Which depends on your data and what you need to accomplish.


You probably typed the name of the column or the table incorrectly.


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

查看全文
相关文章
其他开发语言最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆