Skip to Content.
Sympa Menu

freetds - MS SQL 7.0 and PHP 3.0.11

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Paul Schaap" <Paul.Schaap AT dingoblue.com.au>
  • To: freetds
  • Subject: MS SQL 7.0 and PHP 3.0.11
  • Date: Thu, 22 Jul 1999 3:45:50


Hi,

I have a working version of freetds running with PHP connecting to MS SQL
7.0 but have found that I must CONVERT all the datatypes being returned
from the database to CHAR in my SQL query. I found that if the data type
were :-

INTEGER, a large number would return......not the number from the
database.
FLOAT, the process would blow up somewhere and return 'Document returned no
data' at the browser.
VARCHAR, when displaying on the browser window would 'eat' all following
text until a html tag turned up ?!?!

My phtml looks **something** like this :-
$sql = "SELECT INTEGER_ProductID, VARCHAR_Name, FLOAT_Rate FROM
ProductRate, InternationalCountry WHERE ID = InternationalCountryID AND
ProductRateTypeID = 4"; // I'm not displaying my CONVERTS
echo "$sql<BR>";
$qry = sybase_query($sql);
while(list($i1,$i2,$i3) = sybase_fetch_row($qry)){
echo "INTEGER $i1 ";
echo "VARCHAR $i2 <B></B>"; // NB the tags to fix the hungry VARCHAR
echo "FLOAT $i3<BR>\n"; // KABOOM
}
sybase_free_result($qry);

My freetds config is :-
./configure --with-tdsver=4.2 (4.6 & 5.0 both failed on connect)
with 'aclocal.m4' AM_PROG_INSTALL changed to AC_PROG_INSTALL

My Linux config is :-
LinuxPPC R5 (glibc2) running on a PowerMac G3/450
Kernel 2.2.6
I think the PPC is big endian.

Can anyone point out my error or point me in the direction of a fix ? And
yes I have search the mailing archives extensively :-)

REGARDS
Paul




Archive powered by MHonArc 2.6.24.

Top of Page