Attempting to learn mysqli prepared statements; what am I doing wrong?
问题 Here's the error I'm getting... Failed to prepare statement: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?.Pages WHERE slug='?'' at line 1 And here's my code... require_once("../database/config.php"); $pageSlug = "home"; $db = new mysqli(_DB_HOST, _DB_USER, _DB_PASSWORD, _DB_NAME); if ( $db->connect_errno ) { echo "Failed to connect to MySQL: (" . $db->connect_errno . ") " . $db->connect_error;