Can I write prepared statements in procedural style?
问题 The example from the PHP manual is using OOP. Is there a way to do it procedurally? 回答1: MySQLi has procedural-style function calls that can handle prepared statements. (Some of the procedural-style functions are deprecated, however.) http://us.php.net/manual/en/mysqli-stmt.prepare.php 回答2: Yes, you can. As far as I know PDO is completely object-oriented, but you may want to look into mysqli which allows both procedural and OO styles. Procedural coders will find the basics almost identical.