OCIFreeStatement is it a must?

wxdqz

New Member
For PHP/Oracle8 users..

Is it always a must to use OCIFreeStatement after every SQL execution such as this:
--
$stmt = OCIParse($dbconn, "SELECT command");
OCIExecute($stmt);
OCIFreeStatement($stmt);

$stmt = OCIParse($dbconn, "INSERT command");
OCIExecute($stmt);
OCIFreeStatement($stmt);

$stmt = OCIParse($dbconn, "UPDATE command");
OCIExecute($stmt);
OCIFreeStatement($stmt);
--


Would there be any problems if I do this instead:
--
$stmt = OCIParse($dbconn, "SELECT command");
OCIExecute($stmt);

$stmt = OCIParse($dbconn, "INSERT command");
OCIExecute($stmt);

$stmt = OCIParse($dbconn, "UPDATE command");
OCIExecute($stmt);

OCIFreeStatement($stmt);
--
 
Back
Top