hi , i have a problem with updating and inserting into the Oracle DB.
also after i make changes to the db with the sqlSheet
i have to restart my apache in order to see it in the php
by the way i'm using win2000
what's wrong?
i used ora_error and it returned OK (ora-0000)
here's my code:
//Get the next ident
$strsql="select Max(agentid) from tblAgents";
ora_parse($curs,$strsql);
ora_exec($curs);
array($result);
ora_fetch_into($curs,$result);
$ident=$result[0]+1;
$strsql="INSERT INTO tblAgents (AGENTID,AGENTNAME, AGENTEMAIL , AGENTCONTACTMAN , AGENTLOGO";
$strsql=$strsql.", AGENTREF , AGENTPHONE, AGENTFAX)";
$strsql=$strsql."VALUES (".$ident.",'".$HTTP_POST_VARS["agName"]."', '".$HTTP_POST_VARS["agemail"]."'";
$strsql=$strsql.", '".$HTTP_POST_VARS["agconman"]."' , '".$HTTP_POST_VARS["agLogo"]."', '";
$strsql=$strsql.$HTTP_POST_VARS["agref"]."', '".$HTTP_POST_VARS["agphone"]."', '";
$strsql=$strsql.$HTTP_POST_VARS["agfax"]."')";
//echo $strsql;
//exit;
ora_parse($curs,$strsql);
//echo ora_error($curs);
ora_exec($curs);
ora_close($curs);
also after i make changes to the db with the sqlSheet
i have to restart my apache in order to see it in the php
by the way i'm using win2000
what's wrong?
i used ora_error and it returned OK (ora-0000)
here's my code:
//Get the next ident
$strsql="select Max(agentid) from tblAgents";
ora_parse($curs,$strsql);
ora_exec($curs);
array($result);
ora_fetch_into($curs,$result);
$ident=$result[0]+1;
$strsql="INSERT INTO tblAgents (AGENTID,AGENTNAME, AGENTEMAIL , AGENTCONTACTMAN , AGENTLOGO";
$strsql=$strsql.", AGENTREF , AGENTPHONE, AGENTFAX)";
$strsql=$strsql."VALUES (".$ident.",'".$HTTP_POST_VARS["agName"]."', '".$HTTP_POST_VARS["agemail"]."'";
$strsql=$strsql.", '".$HTTP_POST_VARS["agconman"]."' , '".$HTTP_POST_VARS["agLogo"]."', '";
$strsql=$strsql.$HTTP_POST_VARS["agref"]."', '".$HTTP_POST_VARS["agphone"]."', '";
$strsql=$strsql.$HTTP_POST_VARS["agfax"]."')";
//echo $strsql;
//exit;
ora_parse($curs,$strsql);
//echo ora_error($curs);
ora_exec($curs);
ora_close($curs);