/    Sign up×
Community /Pin to ProfileBookmark

Database not closed

I have been using something similiar to below for inserting 15 values into one table in Oracle 9i using PHP but forgot to use the [b]OCILogoff()[/b] method to logoff and was wondering what issues might occur with the Database connection? So far about 50 records have been inserted into the database and I will probably have another 200 records when it is finished in 2 weeks. Now I dont have access to the site due to permission issues so I wont be able to correct my mistake. Please advise what kind of Database issues might happen?

[code]
<?php
$c=OCILogon(“myname”, “mypassword”, “orcl”);
if ( ! $c ) {
echo “Unable to connect: ” . var_dump( OCIError() );
die();
}

// Insert 15 fields of data into mytable…

$s = OCIParse($c, “INSERT INTO mytable (column1, column2,…)
VALUES (‘value1’, ‘value2’,….)”);
OCIExecute($s, OCI_DEFAULT);

// Commit to save changes…
OCICommit($c);

?>
[/code]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@scragarJun 12.2007 — generaly speaking failing to close a database will just slow the server down slightly, after every request the database connection is automaticly severed anyway so don't worry about it too much. It's only recomended that you close of such connections because for the rest of the page(even while the connection is not in use) it consumes RAM to just keep the connection open, if your not seeing any problems now then you won't see any in the future (unless your load suddenly sky-rockets)
×

Success!

Help @florida spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...