Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我遇到了各种格式,这里是它们
mysqli_query($con,"UPDATE Persons SET Age=36 WHERE FirstName='Peter' AND LastName='Griffin'");
和
SELECT ALL FROM users WHERE user_id=:user_id
..关于 mysql_query,它可以在没有 $con 参数的情况下工作,解释一下?谢谢
它可以在没有 $con 参数的情况下工作,解释一下?
前者代码是MySQLi,后者是PDO语句。
MySQLi
PDO
MySQLi 入门PDO入门
PDO 与 MySQLi
mysql_query 检测到数据库的最后一个连接。