Guest User

Untitled

a guest
Apr 11th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. $sDatabase = 'ddaevolution';
  2. $sDsn = 'mysql:host=217.70.188.223;dbname=ddaevolution';
  3. $sUser = 'hyperprodda';
  4. $sPass = 'oihf58463vilfkhn';
  5.  
  6. $PDO = new PDO( $sDsn, $sUser, $sPass );
  7. $PDO->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
  8.  
  9. $sQuery = "SHOW tables FROM " . $sDatabase;
  10. $sResult = $PDO->query($sQuery);
  11.  
  12. while ($aTable = $sResult->fetch(PDO::FETCH_ASSOC))
  13. echo "Table: $aTable\n";
Add Comment
Please, Sign In to add comment