freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Darryl Friesen" <Darryl.Friesen AT usask.ca>
- To: freetds AT franklin.oit.unc.edu
- Subject: FreeTDS or PHP Bug?
- Date: Wed, 17 Jan 2001 10:52:32 -0500
I'll get the particulars out of the way first: Digital Unix 4.0F, FreeTDS
0.51, Apache 1.3.12 and PHP/4.0.4pl1 (apache module).
In my PHP script, my connection to the server (MSSQL 7.0) seems to get
dropped after an INSERT, UPDATE, or DELETE. The INSERT/UPDATE/DELETE does
work (the table is modified) but any subsequent queries (SELECT etc) will
fail.
The BUGS file mentions a possible (unconfirmed) bug with TDS7 and
INSERT/UPDATE, so I tried compiling with both --with-tdsver=4.2 and
--with-tdsver=7.0, but I get the same result.
I'm not sure whether it's FreeTDS or PHP that's the problem, but I thought
I'd post a message here before I open a bug report with the PHP people.
Any thoughts? I'd appreciate any help or suggestions. I've included my
sample PHP script below (The first SELECT works, the INSERT works, but the
second SELECT fails)
Thanx,
- Darryl
<?php
$dbh = mssql_connect("server","username","password");
$query = mssql_query("SELECT * FROM Subjects", $dbh);
if ($query) {
print "First SELECT successful<BR>\n";
} else {
print "First SELECT failed<BR>\n";
}
$query = mssql_query("INSERT INTO Subjects (Code,Subject) VALUES ('test1',
'TEST 1')", $dbh);
$query = mssql_query("SELECT * FROM Subjects", $dbh);
if ($query) {
print "Second SELECT successful<BR>\n";
} else {
print "Second SELECT failed<BR>\n";
}
?>
----------------------------------------------------------------------
Darryl Friesen, B.Sc., Programmer/Analyst Darryl.Friesen AT usask.ca
Education & Research Technology Services, http://gollum.usask.ca/
Department of Computing Services,
University of Saskatchewan
----------------------------------------------------------------------
"Go not to the Elves for counsel, for they will say both no and yes"
-
FreeTDS or PHP Bug?,
Darryl Friesen, 01/17/2001
- <Possible follow-up(s)>
- Re: FreeTDS or PHP Bug?, Steve Langasek, 01/17/2001
- Re: FreeTDS or PHP Bug?, Darryl Friesen, 01/17/2001
- Re: FreeTDS or PHP Bug?, Darryl Friesen, 01/17/2001
- Re: FreeTDS or PHP Bug?, James Cameron, 01/17/2001
- Re: FreeTDS or PHP Bug?, James K. Lowden, 01/17/2001
- Re: FreeTDS or PHP Bug?, Brian Bruns, 01/21/2001
Archive powered by MHonArc 2.6.24.