|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-01 14:16 UTC] tcurdt at dff dot st
./configure' '--prefix=/usr/share' '--datadir=/usr/share/php' '--bindir=/usr/bin' '--libdir=/usr/share'
'--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--with-sybase-ct=/opt/sybase' '--with-mysql=/usr' '--with-gd=yes'
'--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-tiff-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6'
'--with-ldap=yes' '--with-zlib=yes' '--with-bz2' '--with-gmp' '--with-xml' '--with-ttf' '--with-t1lib' '--with-mcal=/usr' '--with-imap=yes'
'--with-sablot' '--with-ftp' '--with-ndbm' '--with-gdbm' '--with-mcrypt' '--with-gettext' '--with-mm' '--with-gd=yes' '--with-iodbc'
'--enable-versioning' '--enable-yp' '--enable-bcmath' '--enable-trans-sid' '--enable-inline-optimization' '--enable-track-vars'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-shmop' '--enable-calendar'
'--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-exif' '--enable-ftp' '--enable-memory-limit' '--enable-wddx' '--enable-filepro'
'--enable-dbase' '--enable-ctype' '--disable-debug' '--enable-force-cgi-redirect' '--enable-discard-path' '--enable-sigchild' '--with-openssl'
'--with-imap-ssl' '--with-gd=yes' '--with-apxs=/usr/sbin/apxs' '--with-pgsql=/usr' '--with-snmp' 'i386-suse-linux'
Compiles fine. This should work:
<html>
<body>
<?php
$db = odbc_pconnect("TEST","test","test");
if($db){
echo("success");
$rs = odbc_exec($db, "select * from UDT_KUNDEN");
$ar = odbc_fetch_array($rs);
foreach ($ar as $key => $value) {
echo "Key: $key; Value: $value<br>\n";
}
odbc_close($db);
}
?>
</body>
</html>
But I get "Call to undefine function".
I used iODBC + FreeTDS. Other ODBC function seem to work fine.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 22:00:01 2025 UTC |
I found workaround for this function somewhere in internet, but this workaround NOT completely solve the problem. For me, next code may be most usable (PHP 4.3): function odbc_fetch_array($result, $rownumber=-1) { if ($rownumber < 0) { odbc_fetch_into($result, $rs); }else odbc_fetch_into($result, $rs, $rownumber); foreach ($rs as $key => $value) $rs_assoc[odbc_field_name($result, $key+1)] = $value; if (isset($rs_assoc)) return $rs_assoc; else return false; }; while ($w2ta = odbc_fetch_array($w2rc)) $w2fd[$i++] = $w2ta;