Re: PHP and ODBC leaving lots of files open
Mike Prudence <[email protected]> Tue, 22 Jan 2013 10:54:42 +0000
| Newsgroups | gmane.comp.db.mdb-tools.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Chris,
Thanks for the hint.....but to no avail, sadly.
Here's the code in case anyone can spot my stupidity:-
function getClientName($s)
{
$myDB = odbc_connect("Clients", "", "");
$query = "select Name from Clients where ID = '".$s."'";
$result = odbc_exec($myDB, $query);
if (odbc_fetch_row($result))
$retval = odbc_result($result, 'Name');
else
$retval = "Unknown";
odbc_commit($myDB);
odbc_close($myDB);
return $retval;
}
Running this leaves my clients.mdb file open by the apache process
according to lsof -ap.
Puzzling....
--
Cheers,
Mike
[email protected] http://www.filmsat59.com
Films at 59 Ltd, 59 Cotham Hill, Bristol. BS6 6JR ENGLAND +44 117 906 4300
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d