Advertisement
Guest User

Untitled

a guest
Apr 15th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. $DB = '//10.14.61.62:1521/XE';
  3. $DB_USER = 'USERNAME';
  4. $DB_PASS = 'password';
  5. $con=oci_connect($DB, $DB_USER, $DB_PASS,)or die(oci_error());
  6. oci_select_db("10.14.61.62:1521/JURISDB",$con);
  7.  
  8. $query = "SELECT * from USERNAME.events ";
  9. $result = oci_query($query) or die(oci_error());
  10. $arr =array();
  11. while ($row = mysql_fetch_assoc($result)) {
  12. $arr[] = array( "date" => $row["date"], "title" => $row["title"], "description" => $row["description"], "url" => "", );
  13. }
  14. header('Content-type: application/json');
  15. echo json_encode($arr);
  16. die();
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement