If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > How To Update oracle data from php, by using 'Commit' ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-12, 03:41
widiarifki widiarifki is offline
Registered User
 
Join Date: Jan 2012
Posts: 6
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.
Reply With Quote
  #2 (permalink)  
Old 01-29-12, 10:11
Littlefoot Littlefoot is offline
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,629
Does this help?
Reply With Quote
  #3 (permalink)  
Old 01-29-12, 10:12
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,416
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.
Reply With Quote
  #4 (permalink)  
Old 01-30-12, 02:10
widiarifki widiarifki is offline
Registered User
 
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!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On