Skip to Content.
Sympa Menu

freetds - Re:Re: problem on freetds-0.50+php-3.0.14+sybase-11.9.2

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re:Re: problem on freetds-0.50+php-3.0.14+sybase-11.9.2
  • Date: Wed, 15 Mar 2000 22:08:29 -0500 (EST)



I am not able to repeat this with my setup. I am using the CVS version of
freetds (if you are at 0.50, I strongly reccomend getting a copy out of
CVS). I am also using the '--with-sybase' config option for PHP and not
'--with-sybase-ct'...I'm not sure which one you are using.

Brian

On Thu, 16 Mar 2000, hshao wrote:

> below are the php3 and sql scripts
> >>>the sql script:
>
> create table test
> {
> uid numeric(6,0) not null,
> uname varchar(30) not null
> }
> go
>
> insert test (uid,uname) values (1,'hshao')
> go
>
> create procedure add_user
> @uid numeric(6,0),
> @uname varchar(30)
> as
> insert test (uid,uname) values (@uid,@uname)
> go
>
> >>>the test1.php3 script:
>
> <html>
> <head>
> <title>TEST</title>
> </head>
> <body>
> <?
> $dbconn = @sybase_connect ("SYBASE", "sa", "syb2000") or die ("can't
> connect");
> @sybase_select_db ("testdb", $dbconn);
> $sql = "select uid,uname from test";
> echo "$sql<br>";
> $ret = sybase_query ($sql);
> $row = sybase_fetch_row ($ret);
> echo "*row=$row[0]*<br>";
> echo "*row=$row[1]*";
> ?>
> </body>
> </html>
>
> >>>the result of lynx:
>
> select uid,uname from test
> *row=*
> *row=hshao*
>
> >>>the test2.php3 script:
>
> <html>
> <head>
> <title>TEST</title>
> </head>
> <body>
> <?
> $dbconn = @sybase_connect ("SYBASE", "sa", "syb2000") or die ("can't
> connect");
> @sybase_select_db ("testdb", $dbconn);
> $sql = "add_user 2,'hello'";
> echo "$sql<br>";
> $ret = sybase_query ($sql);
> ?>
> </body>
> </html>
>
> >>>the result of lynx:
>
> Making HTTP connection to localhost.
> Sending HTTP request.
> HTTP request sent; waiting for response.
> Alert!: Unexpected network read error; connection aborted.
> Can't Access `http://localhost/test2.jxf'
> Alert!: Unable to access document.
>
> >>> select * from test
> uid uname
> --------- ------------------------------
> 1 hshao
> 2 hello
>
> >>> But sqsh works very good, I am so confused!
>
> >
> >Please submit a sample script that demonstrates this (with table layout
> >and sample data needed)
> >
> >Brian
> >
> >On Tue, 14 Mar 2000, Shao Hui wrote:
> >
> >> hi,all:
> >>
> >> I compiled freetds-0.50 on my FreeBSD-3.4 with php-3.0.14 and
> >> sybase-11.9.2 successfully, but I meet some strange problem:
> >>
> >> 1. I can't select the numeric field of a table, it always return null.
> >> 2. I can't run the procedure I defined.
> >>
> >> When I use sqsh (compiled with freetds-0.50 too), I found no such
> >> problems. Can anyone help me?
> >>
>
>
>
> _________________________________________________________
> ??????????????????????"??" ??????
> ????????????????????????????????????????????Swatch??Nike????????????????????
>
> ??????????????????????????????????????????????????.????????????ChinaRen????T??????????
> http://www.chinaren.com/marketing/bus/index.htm
>
>
> ---
> You are currently subscribed to freetds as: camber AT ais.org
> To unsubscribe, forward this message to
> leave-freetds-12294M AT franklin.oit.unc.edu
>
>





Archive powered by MHonArc 2.6.24.

Top of Page