freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
回复:[freetds] Re: problem on freetds-0.50+php-3.0.14+sybase-11.9.2
- From: hshao <hshao AT chinaren.com>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: 回复:[freetds] Re: problem on freetds-0.50+php-3.0.14+sybase-11.9.2
- Date: Wed, 15 Mar 2000 12:58:22 +0800 (CST)
>>>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
- 回复:[freetds] Re: problem on freetds-0.50+php-3.0.14+sybase-11.9.2, hshao, 03/15/2000
Archive powered by MHonArc 2.6.24.