Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. function create_new_file()
  2. {
  3. $DB = '//10.11.201.170:1521/XE';
  4. $DB_USER = 'BIOTPL';
  5. $DB_PASS = 'biotpl';
  6. $DB_CHAR = 'AL32UTF8';
  7.  
  8. $conn = oci_connect($DB_USER, $DB_PASS, $DB, $DB_CHAR);
  9.  
  10. if($conn)
  11. {
  12. $sql = "INSERT INTO FILEDATA (PR_KEY,FILEDATA,FILENAME)
  13. VALUES (FILE_SEQ.nextval,EMPTY_BLOB(),'".$fileName."')";
  14. $stmt = oci_parse($conn,$sql);
  15. $result=oci_execute($stmt);
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement