Guest User

Untitled

a guest
Jan 20th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2. include("lib/adodb/adodb.inc.php");
  3. $db = NewADOConnection('mysqli');
  4. $db->Connect("moodle-snapshot-a.ucl.ac.uk", "database_user", "password", "moodle_archive_1415");
  5. $result = $db->Execute("SELECT * FROM mdl_user limit 2");
  6. if ($result === false) die("failed");
  7. while (!$result->EOF) {
  8. for ($i=0, $max=$result->FieldCount(); $i < $max; $i++)
  9. print $result->fields[$i].' ';
  10. $result->MoveNext();
  11. print "<br>\n";
  12. }
Add Comment
Please, Sign In to add comment