购物车-数据库连接-mysql 学习笔记

JDBC 中 CreateStatement 和 PrepareStatement 的区别与优劣。

链接 : https://blog.csdn.net/u011161786/article/details/48394751
这篇写得很好,比较清晰

查询避免Unknown column ‘xxx’ in ‘where clause’

链接: https://blog.csdn.net/fastkeeper/article/details/47783739

但凡写过sql语句的人估计都曾经碰到过类似于Unknown column ‘xxx’ in ‘where clause’的问题。 单从字面理解,我们很容易得出
列名不存在的结论,但是,很多时候起始并不是由于列名出错造成的。而是由于拼凑sql语句时对字符类型数据没有用引号引起来造成的。如果数据是字符串,必须再加一个引号解决

猜你喜欢

转载自blog.csdn.net/qq_40940540/article/details/84521267