Re: Bug #13285 Updated: Freetds+iODBC Problems retrivind numeric data

From: Date: Thu, 13 Sep 2001 16:15:45 +0000
Subject: Re: Bug #13285 Updated: Freetds+iODBC Problems retrivind numeric data
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65883@lists.php.net to get a copy of this message
Configure Line: ./configure' '--prefix=/usr/local/matriz/php4' '--with-apxs=/usr/local/matriz/apache/bin/apxs' '--with-iodbc=/usr/local/matriz/iodbc' '--enable-track-vars' Script PHP: <?php putenv("LD_LIBRARY_PATH=/usr/local/freetds/lib/libtdsodbc.so"); putenv("ODBCINSTINI=/etc/odbcinst.ini"); putenv("ODBCINI=/etc/odbc.ini"); if ($con = odbc_pconnect("SQLSERVER","username","passwd")) { print "Success! <br>"; } else { print "Error connection <br>"; } // This line prints "Success"; $sql = "SELECT * FROM contacts"; /* Contacts have 2 fields: Name (char) and Number (numeric) */ $prep = odbc_prepare($con,$sql); if (odbc_execute($prep)) { while (odbc_fetch_row($prep)) { print odbc_result($prep,1); // Print correct name print " - "; print odbc_result($prep,2); // Print nothing, not return any error, simply prints '' print "<br>\n"; } } else { print "Error executing query! <br>"; } ?> ----- Original Message ----- From: "Bug Database" <php-dev@lists.php.net> To: <fernando@robynet.com.br> Sent: Thursday, September 13, 2001 12:32 PM Subject: Bug #13285 Updated: Freetds+iODBC Problems retrivind numeric data : ID: 13285 : Updated by: sander : Reported By: fernando@robynet.com.br : Old Status: Open : Status: Feedback : Bug Type: ODBC related : Operating System: Linux Mandrake : PHP Version: 4.0.4pl1 : New Comment: : : Can you provide a sample script and your configure line? : : Previous Comments: : ------------------------------------------------------------------------ : : [2001-09-13 11:28:20] fernando@robynet.com.br : : When retrivind fields type numeric the odbc_result() prints nothing. : : ------------------------------------------------------------------------ : : : : ATTENTION! Do NOT reply to this email! : To reply, use the web interface found at http://bugs.php.net/?id=13285&edit=2 : :

« previous php.dev (#65883) next »