PHP PDO
関連タイピング
-
プレイ回数298英語長文258打
-
プレイ回数9619長文956打
-
プレイ回数2718英語長文721打
-
プレイ回数2589英語54打
-
プレイ回数2771190打
-
プレイ回数33万1071打
-
プレイ回数3093長文60秒
-
プレイ回数661長文590打
問題文
(try{}catch(pdoexception $e){die($e->getmessage());})
try{}catch(){}
($dsn=’mysql:host=localhost;dbname=users;charset=utf8’;)
$dsn='mysql:dbname=user;host=localho
($user=’username’;)
$user='username';
($pass=’password’;)
$password='';
($dbh=new pdo($dsn,$user,$pass);)
$dbh=new PDO($dsn,$user,$pass);
($dbh->setattribute(pdo::attr_errmode,)
$dbh->setAttribute(PDO::ATTR_ERRMODE
(pdo::errmode_exception);)
$dbh->setAttribute(PDO::ATTR_ERRMODE
($dbh->setattribute(pdo::attr_emulate_prepares,false);)
$pdo->setAttribute(PDO::ATTR_EMULATE
($sql=’select name from users where code=?’;)
$sql='SELECT name FROM WHERE;
($stmt=$dbh->prepare($sql);)
$stmt=$dbh->prepare($sql);
($code=1;)
$code=1;
($stmt->bindvalue(1,$code,pdo::param_int);)
$stmt->bindValue();
($stmt->execute();)
$stmt->execute();
($count=$stmt->rowcount();)
$stmt->rowCount();
($users=$stmt->fetchall(pdo::fetch_assoc);)
$stmt->fetchAll(PDO::FETCH_ASSOC);
(foreach($users as $user){print_r($user);})
foreach($users as $user){}
($dbh=null;)
$dbh=null;