ODBC_EXEC - PROBLEMS ON NEW VERSION
| From: | Georges da Mata Claessen | Date: | Fri, 08 Dec 2000 10:41:02 +0000 |
| Subject: | ODBC_EXEC - PROBLEMS ON NEW VERSION | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29316@lists.php.net to get a copy of this message | ||
Hi friends,
after some digging I've found that to compile PHP 4.0.2 (or 4.0.3PL1 or
4.0.4RC4) with Openlink ODBC on Sun Solaris we must alter
php_odbc.c, changing:
"SQLINTEGER len" to "SDWORD len".
Ok, it now compiles. But ODBC functions that used to work in PHP 3.0.12
doesn't work anymore.
The following code gives the error:
Warning: SQL error: [OpenLink][ODBC][Driver]Syntax error or access, SQL
state 37000 in
SQLExecDirect in
/software/apache/htdocs/aplic/teste/teste.htm on line 28
<?
$db = odbc_connect("DSN=Producao;UID=notes" , "" , "");
$query = "select nomefunc, matrica from srhtb002";
$result = odbc_exec ($db, $query); // THIS is line 28
print "ok. result = $result";
$nextrow = odbc_fetch_row($result, 1);
if (! $nextrow ) {
print "Nothing...<br>";
}
else {
print odbc_result($result , 1 );
print "<br>";
print odbc_result($result , 2 );
}
?>
Does these ODBC functions changed their sintax ????????
Thanks!