freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT ais.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: Freetds + Unixodbc + PHP
- Date: Mon, 3 Dec 2001 18:48:07 -0500 (EST)
Ok thanks, I think I should be able to track it down from here, although
I'm a bit squeezed for time tonight. A work around may be to structure
the code more traditionally like:
$res = odbc_exec($conn, "select * from table1");
while (odbc_fetch_row($res)) {
echo odbc_result($res,"col1");
echo odbc_result($res,2);
}
Note: I'm typing it from memory but that should be the jist of it. This
should ensure that the first result set is closed out. By the way, if you
compile php in cgi mode and run it with TDSDUMP set, you may see something
like 'Attempt to initiate a new query with results pending.' to make sure
the error is what I think it is.
Brian
On Mon, 3 Dec 2001, J. 'FIK' Brand wrote:
> This is the php script i use :
>
> $conn = odbc_connect ("doc","unixodbc","")
> or die ("can't open connnection");
> $res = odbc_exec ($conn, "select * from book")
> or die ("can't execut query");
> echo odbc_result($res,"bk_id");
> echo odbc_result($res,2);
>
> $res = odbc_exec ($conn, "select * from pages")
> or die ("can't execut query");
> echo odbc_result($res,"pg_id");
> echo odbc_result($res,2);
>
> Like this is doesn't work, when i delete the last 4 line it works.
>
> Jurgen
>
>
> ----- Original Message -----
> From: "Brian Bruns" <camber AT ais.org>
> To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
> Sent: Monday, December 03, 2001 8:36 PM
> Subject: [freetds] Re: Freetds + Unixodbc + PHP
>
>
> >
> > Can you send an example script of the the problem?
> >
> > thanks,
> >
> > Brian
> >
> > On Mon, 3 Dec 2001, J. 'FIK' Brand wrote:
> >
> > > Hello,
> > >
> > > My config :
> > >
> > > NT Server
> > > - NT 4.5 (SP6)
> > > - SQL server 7.0
> > >
> > > Linux server
> > > - redhat 6.2
> > > - unxiODBC 2.1.0
> > > - freetds (current snapshot)
> > > - PHP 4.0.6
> > >
> > > My problem :
> > >
> > > I can open a connection and execute a SQL statment, but when i try to
> run a second statment on the same connection the page become's unloadable.
> > >
> > > In isql (command utilitie from unixodbc) i can execute as many statments
> as i want and all work.
> > >
> > > Thanks
> > >
> > > Jurgen Brand
> > >
> > >
> > >
> >
> >
> > ---
> > You are currently subscribed to freetds as: [jurgen.brand AT tip.nl]
> > To unsubscribe, forward this message to
> $subst('Email.Unsub')
> >
>
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
-
Freetds + Unixodbc + PHP,
J. 'FIK' Brand, 12/03/2001
- <Possible follow-up(s)>
- Re: Freetds + Unixodbc + PHP, Brian Bruns, 12/03/2001
- Re: Freetds + Unixodbc + PHP, J. 'FIK' Brand, 12/03/2001
- Re: Freetds + Unixodbc + PHP, Brian Bruns, 12/03/2001
- Re: Freetds + Unixodbc + PHP, J. 'FIK' Brand, 12/04/2001
- Freetds + Unixodbc + PHP, J. 'FIK' Brand, 12/05/2001
- Re: Freetds + Unixodbc + PHP, Brian Bruns, 12/05/2001
- Re: Freetds + Unixodbc + PHP, J. 'FIK' Brand, 12/05/2001
- Re: Freetds + Unixodbc + PHP, J. 'FIK' Brand, 12/05/2001
Archive powered by MHonArc 2.6.24.