PHP, MySQL 출력 방식
EUNJIHA opened this issue · 3 comments
EUNJIHA commented
function showBands(){
$pdo = pdoSqlConnect();
$query = "select b.bandKey, b.bandPicURL
from band b;";
$st = $pdo->prepare($query);
$st->execute();
// $st->execute([$postKey]); --> query문에 ? 넣고 변수로 입력 받고 싶을 때
$st->setFetchMode(PDO::FETCH_ASSOC);
$res = $st->fetchAll();
$st = null;
$pdo = null;
return $res;
// return $res[0];
}
EUNJIHA commented
EUNJIHA commented
EUNJIHA commented