Skip to Content.
Sympa Menu

freetds - Re: via PHP to Microsoft SQL Server V7.0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: James Cameron <james.cameron AT compaq.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: via PHP to Microsoft SQL Server V7.0
  • Date: Tue, 18 Jan 2000 11:48:42 +1100


Brian Bruns wrote:
> Can you provide a bit more info about your environment...What your
> $SYBASE var is set to, a copy of the interfaces file entry, etc... also
> does it run ok when using an IP address instead of a hostname?

This may be my problem. I have no idea what this SYBASE environment
variable is for, nor why I should have an interfaces file.

Can you tell me what I should set these to? Or point to documentation
that explains them?

I had assumed that I need only place the DNS host name or IP address
into the sybase_connect() call in PHP.

<?php
$link = sybase_connect("10.0.0.2","user","pass");
if ($link == 0) {
echo "sybase_connect failed\n";
exit;
}
printf("link=%d\n", $link);
$result = sybase_query("select * from tables", $link);
while($row = sybase_fetch_row($result)) {
echo "<hr>".stripslashes($row[0])."\n";
}
sybase_free_result($result);
$status = sybase_close($link);
?>

--
James Cameron (cameron AT stl.dec.com)




Archive powered by MHonArc 2.6.24.

Top of Page