Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のPerlコードスニペットからの結果をどのように印刷できるのか疑問に思っています。
$sth = $dbh->prepare("SELECT * FROM table_name"); $sth->execute();
mySQLに「SELECT*FROM table_name;」と入力し、リレーション全体を表示した場合に表示される内容を確認したいと思います。ループして出力できる$ sthからの戻り値はありますか?
# BIND TABLE COLUMNS TO VARIABLES $sth->bind_columns(undef, \$id, \$product, \$quantity); # LOOP THROUGH RESULTS while($sth->fetch()) { print "$id, $product, $quantity <br />"; }