freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Usman" <usman AT mail.arts.ubc.ca>
- To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] no-PHP
- Date: Wed, 26 Jul 2006 16:42:17 -0700
Here the test code.
<?php
// connect to a DSN "MSSQLTest"
print_r("we are trying to connect");
$connect = odbc_connect("MSSQLTest", "test_user", "passX") or die ("couldn't
connect");
print_r($connected);
// ***query the users table for all fields***
$query = "SELECT * FROM localTable";
// ***perform the query****
$result = odbc_exec($connect, $query);
// ***successfully ran query***
// ***fetch the data from the database***
$temp = mssql_num_rows($result) ;
print_r("display the number of records". $temp );
while(odbc_fetch_row($result)) {
$field1 = odbc_result($result, 1);
$field2 = odbc_result($result, 2);
print_r("$field1 $field2\n");
}
print_r("displayed results");
# close the connection
odbc_close($connect);
?>
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org [mailto:freetds-
> bounces AT lists.ibiblio.org] On Behalf Of Rich Young
> Sent: Wednesday, July 26, 2006 1:04 PM
> To: FreeTDS Development Group
> Subject: Re: [freetds] no-PHP
>
> Do you want to show us some code? And have you looked in your error
> logs? PHP has a setting that supresses user-visible error messages for
> security reasons; if your server is configured in that manner, you might
> be missing some pretty informative info in the logs.
>
> --------------------------
> I'm Rich Young, and I approved this message.
>
>
> > -----Original Message-----
> > From: freetds-bounces AT lists.ibiblio.org
> > [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Usman
> > Sent: Wednesday, July 26, 2006 12:27 PM
> > To: 'FreeTDS Development Group'
> > Subject: [freetds] no-PHP
> >
> > So, here is the situation.
> > I installed all the required libraries. Now I can connect to
> > MSSQL server from shell and run all my queries.
> >
> > But...When I try to use it through PHP, there is no luck. I
> > don't even get an error. It apparently connects to the db
> > server ass well but doesn't loop through the result set.
> >
> > Any ideas?
> >
> > Thanks,
> > Usman
> >
> >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> >
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
-
Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield,
Thompson, Bill D (London), 07/25/2006
-
Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield,
chiang . tan, 07/25/2006
-
[freetds] no-PHP,
Usman, 07/26/2006
-
Re: [freetds] no-PHP,
Rich Young, 07/26/2006
-
Re: [freetds] no-PHP,
Usman, 07/26/2006
-
Re: [freetds] no-PHP,
Rich Young, 07/27/2006
- Re: [freetds] no-PHP, Daniel Fazekas, 07/27/2006
-
Re: [freetds] no-PHP,
Rich Young, 07/27/2006
-
Re: [freetds] no-PHP,
Usman, 07/26/2006
-
Re: [freetds] no-PHP,
Rich Young, 07/26/2006
-
Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield,
James K. Lowden, 07/29/2006
- Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield, chiang . tan, 07/30/2006
-
[freetds] no-PHP,
Usman, 07/26/2006
- <Possible follow-up(s)>
- Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield, Lowden, James K, 07/31/2006
-
Re: [freetds] Attempt to convert data stopped by syntax error in sourcefield,
chiang . tan, 07/25/2006
Archive powered by MHonArc 2.6.24.