Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <?
  2.  
  3. $pdo = new PDO("mysql:host=localhost;dbname=global","konstantin","neto0702");
  4. $sql="SELECT name, author, year, isbn, genre FROM global";
  5. foreach ($pdo->query($sql) as $row){
  6. echo $row['name']."\t";
  7. echo $row['author']."\t";
  8. echo $row['year']."\t";
  9. echo $row['isbn']."\t";
  10. echo $row['genre']."<br/>";
  11. }
  12.  
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement