Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2012
    Posts
    6

    Unanswered: How To Update oracle data from php, by using 'Commit' ?

    dear everybody,

    I want to ask something that make me confuse. About work using PHP n Oracle together.

    I want to update an existing data on oracle table. I use this script:

    Code:
    //connect to database
    $conn=ora_logon("hr","hr");
    $cur=ora_open($conn);
    
    $no_dept=$_POST['no_dept'];
    $nm_dept=$_POST['name_dept'];
    
    ora_parse($cur, "update departement set nm_dept='$nm_dept' where no_dept='$no_dept'");
    ora_exec($cur);
    Going well, without error. But, when I go back to index.php which showing fetching data from department table. The data which I have updated doesn't change. I think it needs 'COMMIT'. But how I use it on PHP??

    I've been searching on Google. But, I didn't find the answer.

    Please help your Junior.
    Thanks for your response.

    Regards,
    widia.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Does this help?

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    yes COMMIT is required to make DML permanent
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Jan 2012
    Posts
    6
    Quote Originally Posted by Littlefoot View Post
    Does this help?
    Quote Originally Posted by anacedent View Post
    yes COMMIT is required to make DML permanent
    Ok, I've got the answer my brothers

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •