Appologies in advance for any duplication, but I wasn't sure which list
would be best to use for this question.

I'm having a problem with PHP 4.04pl1 and Sybase/FreeTDS, but before I open
a bug report I thought I'd check if anyone else is having the same problem.

Server Details: Digital Unix 4.0F, FreeTDS 0.51, Apache 1.3.12 and
PHP/4.0.4pl1 (installed as an Apache module).  Database server is SQl 7.0 on
an NT machine.

In my test PHP script, my connection to the database server 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.

I can't reproduce this problem with sqsh or perl (using DBD::Sybase), so I'm
thinking it's a PHP issue.  I've tried compiling FreeTDS
with --with-tdsver=4.2 and --with-tdsver=7.0; same result.

Is anyone else having this problem?  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).

If I do file this in the bugs database, should I list it as Sybase-CT
related or MSSQL server related?

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    [EMAIL PROTECTED]
  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"



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to