Home » Open Source » Programming Interfaces » How To Update oracle data from php, by using 'Commit' ? (Oracle 10g XE, PHP 5.2.6, OS Windows7)
How To Update oracle data from php, by using 'Commit' ? [message #541174] |
Sun, 29 January 2012 02:46  |
|
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:
//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??
Please help your Junior.
Thanks for your response. 
Regards,
widia.
|
|
|
|
|
Goto Forum:
Current Time: Fri Mar 07 14:24:54 CST 2025
|