我正在尝试学习 PDO,但我还没有在任何其他网站上遇到过这个,
我有2个疑问...
$query = mysql_query("INSERT INTO `users` (oauth_provider, oauth_uid, username,email,twitter_oauth_token,twitter_oauth_token_secret) VALUES ('$oauth_provider', $uid, '$username','$email','','')") or die(mysql_error());
$query = mysql_query("SELECT * FROM `users` WHERE oauth_uid = '$uid' and oauth_provider = '$oauth_provider'");
$result = mysql_fetch_array($query);
return $result;
这是如何写成准备好的声明的?
$query1 = "INSERT QUERY";
$stmt1 = $DBH->prepare($query1);
$query2 = "SELECT QUERY";
$stmt2 = $DBH->prepare($query2);