ID: 13783
Updated by: ahill
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: ODBC related
Operating System: SCO Openserver 5.0.5 & RH Lnux 7
PHP Version: 4.0.6
New Comment:
The current SDK version is 3.0.5 and isql.h is included in it. Please get the SDK from
either www.openlinksw.com or www.iodbc.org and recompile without commenting out the
references.
Best regards,
Andrew Hill
OpenLink Software
Previous Comments:
------------------------------------------------------------------------
[2001-10-22 20:59:00] [EMAIL PROTECTED]
No errors at all, just returns an empty recordset.
One probably important note. When I compiled PHP 4.0.6 I had to remove the reference
to isql.h? in the php_odbc source program as it wasn't in the Openlink SDK for
Openlink 4.1.
Everything seems to work except the selected record stuff which hasn't ever worked for
me using PHP 4 against Openlink.
I think I had it working under PHP 3.0.15 against Openlink 3.2, but we have moved on
since then.
------------------------------------------------------------------------
[2001-10-22 20:56:36] [EMAIL PROTECTED]
Using odbc_fetch_into($id, $number, $result_array);
SQLAllocHandle ( ... )
SQL_SUCCESS
SQLSetStmtAttr ( ... )
SQL_SUCCESS
SQLAllocHandle ( ... )
SQL_SUCCESS
SQLDriverConnect ( ... )
SQL_SUCCESS
SQLGetInfo ( ... )
SQL_SUCCESS
SQLGetInfo ( ... )
SQL_SUCCESS
SQLAllocHandle ( ... )
SQL_SUCCESS
SQLGetStmtAttr ( ... )
SQL_SUCCESS
SQLGetStmtAttr ( ... )
SQL_SUCCESS
SQLGetStmtAttr ( ... )
SQL_SUCCESS
SQLGetStmtAttr ( ... )
SQL_SUCCESS
SQLGetInfo ( ... )
SQL_SUCCESS
SQLSetStmtAttr ( ... )
SQL_SUCCESS
SQLExecDirect ( ... )
SQL_SUCCESS
SQLNumResultCols ( ... )
SQL_SUCCESS
SQLNumResultCols ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLBindCol ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLBindCol ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLBindCol ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLBindCol ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLBindCol ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLBindCol ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLColAttribute ( ... )
SQL_SUCCESS
SQLBindCol ( ... )
SQL_SUCCESS
SQLExtendedFetch ( ... )
SQL_SUCCESS
SQLExtendedFetch ( ... )
SQL_ERROR
SQLFreeHandle ( ... )
SQL_SUCCESS
SQLDisconnect ( ... )
SQL_SUCCESS
SQLFreeHandle ( ... )
SQL_SUCCESS
SQLFreeHandle ( ... )
SQL_SUCCESS
------------------------------------------------------------------------
[2001-10-22 10:31:58] [EMAIL PROTECTED]
Status -> Feedback
------------------------------------------------------------------------
[2001-10-22 09:38:15] [EMAIL PROTECTED]
Are you getting error messages?
Also, please generate an odbc trace; uncomment the DebugFile section in odbc.ini.
Best regards,
Andrew Hill
OpenLink Software
------------------------------------------------------------------------
[2001-10-21 20:59:21] [EMAIL PROTECTED]
Platforms:
Using PHP 4.0.6/Openlink 4.1/Progress 8.3D.
Other:
I've tried PHP 4.0.4/4.0.5/4.0.6, Openlink 3.2,4.0,4.1, Progress 8.3C,8.3D,9.1C,
shared memory and TCP/IP based connections.
Problem:
Doesn't seem to matter what I do, I am completely unable to select specific rows using
ODBC.
I think the code below is correct, it's snipped from scripts.
<?
$dsn="DSN=$database;UID=$user;PWD=$password";
// I've tried all these without a difference.
$cursor="SQL_CUR_USE_ODBC";
//$cursor="SQL_CUR_IF_NEEDED";
//$cursor="SQL_CUR_USE_DRIVER";
//$cursor="SQL_CUR_DEFAULT";
$sql="SELECT * FROM user_table";
$text="";
function db_fetch_into($id, $number) {
global $text;
$text = "<TD>ROW: $number</TD>";
//Never Returns Anything
//odbc_fetch_into($id, $number, $result_array);
//Always Works
odbc_fetch_into($id, $result_array);
//Always Works
//odbc_fetch_into($id, 0, $result_array);
return $result_array;
}
if ($conn=odbc_connect("$dsn","","","$cursor")){
echo "<TABLE border='1'>";
//while ((odbc_fetch_into($results,$pos,$row)) && ($count<$limit)) {
$pos=0;
while ((list($var1,$var2) = db_fetch_into($result, $pos)) && ($pos<10)) {
echo "<TR>$text<TD>$var1</TD><TD>$var2</TD></TR>";
$pos ++;
}
echo "</TABLE>";
odbc_free_result($result);
odbc_close($conn);
} else {
// No connection .....
}
?>
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13783&edit=1
--
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]