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

Brian Bruns camber at umcc.ais.org
Wed Mar 15 22:08:29 EST 2000



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, at 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
> 
> 




More information about the FreeTDS mailing list