Guest User

Untitled

a guest
Jul 3rd, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2. try
  3. {
  4. $user = 'magento_db';
  5. $pass = 'mypass';
  6.  
  7. $con = new PDO('mysql:host=localhost;dbname=magento_db', $user, $pass);
  8. foreach($con->query('SELECT * from admin_role') as $row) {
  9. print_r($row);
  10. }
  11. $con = null;
  12. }
  13. catch (PDOEception $e) {
  14. print "Error!: " . $e->getMessage() . "<br/>";
  15. die();
  16. }
  17. ?>
Add Comment
Please, Sign In to add comment