php4-odbc problem
Hi,
I've a little problem with a Debian woody machine with the postgresql-7.4
deb package downloaded from:
ftp://ftp.postgresql.org/pub/binary/v7.4/debian/ woody/main/binary-i386/
When I use the substring sql command from a php script via an ODBC DSN I
get no result. By example:
$query = "select SUBSTRING(field_name,3)from table_name;";
echo "$query";
$resul = odbc_exec($conex, $query);
if ($resul == 0){
printf("Error %d \n", $resul);
exit ();
}
$number_of_rows = odbc_num_rows($resul);
if ($number_of_rows > 0)
{
for ($i=1; $i < $number_of_rows + 1; $i++)
{
$ret = odbc_fetch_into($resul, &$field);
echo "field_name=$field[0]";
}
}
This code returns a lot of empty rows.
If I use the same query using the isql tool (with same DSN), i get the
same number of rows with the correct.
The rest of the php odbc scripts work fine, the only problem is with the
queries containing SUBSTRING queries...
I've installed the following packages:
dpkg -l | grep php
ii libphp-phplot 4.4.6-2 The graphic library for php.
ii php4 4.1.2-6woody3 A server-side, HTML-embedded scripting
langu
ii php4-gd 4.1.2-6woody3 GD module for php4
ii php4-ldap 4.1.2-6woody3 LDAP module for php4
ii php4-mysql 4.1.2-6woody3 MySQL module for php4
ii php4-odbc 4.1.2-6woody3 ODBC module for php4
ii php4-pear 4.1.2-6woody3 PEAR - PHP Extension and Application
Reposit
ii php4-snmp 4.1.2-6woody3 SNMP module for php4
ii php4-sybase 4.1.2-6woody3 Sybase / MS SQL Server module for php4
ii phpdoc 20020310-1 Documentation for PHP4 and PHP3
dpkg -l | grep odbc
ii odbc-postgresq 7.4-0.woody.1 ODBC support for PostgreSQL
ii odbcinst1 2.1.1-8 Support library and helper program for
acces
ii php4-odbc 4.1.2-6woody3 ODBC module for php4
ii unixodbc 2.1.1-8 ODBC tools libraries
dpkg -l | grep postgres
ii odbc-postgresq 7.4-0.woody.1 ODBC support for PostgreSQL
ii postgresql 7.4-0.woody.1 Object-relational SQL database, descended
fr
ii postgresql-cli 7.4-0.woody.1 Front-end programs for PostgreSQL
ii postgresql-con 7.4-0.woody.1 Additional facilities for PostgreSQL
ii postgresql-dev 7.4-0.woody.1 Header files for libpq (postgresql
library)
ii postgresql-plr 7.4-0.woody.1 Procedural Language interface between
Postgr
dpkg -l | grep libpq
ii libpgsql2 7.2.1-2woody4 Shared library libpq.so.2 for PostgreSQL
ii libpq3 7.4-0.woody.1 Shared library libpq.so.3 for PostgreSQL
ii postgresql-dev 7.4-0.woody.1 Header files for libpq (postgresql
library)
Thanks in advance,
Manuel Martínez Valls
Reply to: