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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] : 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] [EMAIL PROTECTED] : : 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 : : -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Re: Bug #13285 Updated: Freetds+iODBC Problems retrivind numeric data
Fernando de Figueiredo Torres Thu, 13 Sep 2001 08:46:21 -0700