首页 \ 问答 \ 'where子句'中的未知列''(Unknown column '' in 'where clause')

'where子句'中的未知列''(Unknown column '' in 'where clause')

我的查询正在抛出这个错误。 任何人都能看到为什么

$query = "SELECT * FROM Units WHERE ID = `$uniqueUnits[a]`";

'where子句'中的未知列''


My query is throwing up this error. Can anyone see why?

$query = "SELECT * FROM Units WHERE ID = `$uniqueUnits[a]`";

Unknown column '' in 'where clause'


原文:https://stackoverflow.com/questions/7042998
更新时间:2022-09-05 15:09

最满意答案

我无法找到用空CHAR替换单个CHAR的解决方案,因为空字符似乎不存在,就像空字符串一样。 我改变了sub来接受字符串而不是字符,这很好用......即使只替换1个字符。


I'm not able to find a solution to replace a single CHAR by an empty CHAR, since an empty char doesn't seem to exist, like an empty string does. I changed the sub to take in strings instead of chars, this works fine...even when replacing only 1 character.

相关问答

更多
  • 在表单上删除一个名为pnlLayout的TableLayoutPanel,以及名为btnAdd的Add按钮。 将TableLayoutPanel配置为具有两列,根据需要调整列宽。 将代码粘贴到您的表单中: Public Class Form1 Dim deleteButtons As List(Of Button) Dim textBoxes As List(Of TextBox) Sub New() ' This call is required by the designer. ...
  • 我无法找到用空CHAR替换单个CHAR的解决方案,因为空字符似乎不存在,就像空字符串一样。 我改变了sub来接受字符串而不是字符,这很好用......即使只替换1个字符。 I'm not able to find a solution to replace a single CHAR by an empty CHAR, since an empty char doesn't seem to exist, like an empty string does. I changed the sub to take ...
  • VB.NET不支持控件数组,与VB6的意义相同。 不过,你可以做类似的事情。 例如,如果要使用相同的方法处理来自多个控件的事件,可以这样做: Private Sub MyClickHandler(sender As Object, e As EventArgs) Handles _ Button1.Click, _ Button2.Click, _ Button3.Click Dim buttonThatWasClicked As Button = CType(sender ...
  • 您必须为表单的.Controls集合执行For Each。 但请注意,如果表单的子控件在其自己的.Controls集合中具有更多控件,则不会考虑它们。 您必须创建递归函数才能遍历整个父子控件链以查找所有控件。 现在,对于每个控件,您可能希望执行Case语句来检查每个控件的Type Of。 然后将控件转换为它的类型并获取属性。 You have to do a For Each for the form's .Controls collection. However, note that if a child ...
  • 一个简单的方法是 My.Computer.FileSystem.WriteAllText("c:\filename", "text", False) MSDN A easy method would be My.Computer.FileSystem.WriteAllText("c:\filename", "text", False) MSDN
  • 如果TextBox控件位于主窗体上,那么您可以遍历它们: For Each tb As TextBox In Me.Controls.OfType(Of TextBox)() tb.Text = String.Empty Next 如果它们位于面板中,则将Me关键字替换为面板的名称。 If the TextBox controls are just on the main form, then you can loop through them: For Each tb As TextBox In M ...
  • 我不知道vb,但我知道你被卡住了。 我认为最简单的方法是添加公共检查以查看该字段是否已初始化,例如: Dim hasText As boolean = false 在你声明的地方。 然后在你的按钮点击事件中,你要检查是否hasText == true并且只在该场景中增加n。 您可以使用我认为的每个case语句将hasText设置为true。 在C ++中,我将一个成员函数添加到buttonClick对象作为发送者,以检查自己的文本,并且只有当这是真的时才增加n。 我不确定你是否可以在vb中做到这一点! ...
  • 使用列表而不是数组。 在.NET中,您无法调整数组的大小。 ReDim Preserve命令创建一个新数组,并将旧数组中的所有项复制到新数组。 阵列越大,这自然会花费更长的时间。 创建列表: Dim ITNObjects as New List(Of ITNObject) 将项添加到列表中: Dim temp as New ITNObject() temp.Toid = toid(i) temp.RoadRank = RoadRank ITNObjects.Add(temp) Use a list in ...
  • 你的问题是.Replace。 您应该只更改当前字符。 在这里,我正在创建一个带有结果的新字符串。 Dim mess As String = TextBox1.Text Dim result As String = "" For i As Integer = 0 To mess.length-1 Dim c As Char = mess(I) Dim itemindex As Integer = Array.IndexOf(charArray2, c) result &= charAr ...
  • Public Shared array(,) As Object 定义一个可以访问的对象数组,无需任何对象引用。 在函数SelectFileButton您定义另一个也称为数组的对象数组变量: static array(,) 对此变量的任何更改都不会反映在您的共享数组中。 选项:删除静态修饰符并确保访问共享数组。 选项:使数组不共享,但将ByRef给所有必需的函数 Public Shared array(,) As Object defines an object array which is ac ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)