I'm using PHP to access a remote Oracle database;
function select(){
$conn = ocilogon($username,$passwo
rd,$sid);
$s = ociparse($conn, "SELECT * FROM table1");
ociexecute($s, OCI_DEFAULT);
while (ocifetch($s)){
echo ociresult($s, "LABEL");
}
function insert(){
$conn = ocilogon($username,$passwo
rd,$sid);
$s = ociparse($conn, "INSERT INTO table1(LOCATION,PATH,LABEL
) VALUES (12345, '/home/koko', 'testlabel');
ociexecute($s, OCI_DEFAULT);
}
The problem is this, when i call the function select(), it prints out the data from table1.
when i call insert(), no error is returned but nothing is inserted when i do a select() after i call the insert();
any ideas ?
Start Free Trial