ID: 29600 Updated by: [EMAIL PROTECTED] Reported By: me at kamuzon dot ru -Status: Open +Status: Bogus -Bug Type: ODBC related +Bug Type: *Directory Services problems Operating System: OS/2 PHP Version: 4.3.8 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Try var_dump() on the variables and you'll see why it doesn't work. Previous Comments: ------------------------------------------------------------------------ [2004-08-10 15:31:38] me at kamuzon dot ru Description: ------------ values, which I got from db via odbc <> values, which I make by $a=blablablaNumber; Reproduce code: --------------- function getid($table,$field,$value){ global $dbcon; $sql="select id from $table where $field='$value'"; if($result=odbc_exec($dbcon,$sql)){ if (odbc_fetch_into($result,$ware)) { if($ware[0]){ odbc_free_result($result); return $ware[0]; } else { odbc_free_result($result); return false; } } } } $cid=getid('yaol_currencies','currencynick','usd'); //via odbc from db2 it gets id (smallint) from table yaol_currencies echo $cid; //return -32766 $a=-32766; $b[$cid]='ddd'; if ($b[$a]=='ddd') {echo 'gut';} Expected result: ---------------- string 'gut' not posted on output but if I add line $cid+=0; then string 'gut' will posted on output Actual result: -------------- I think $b[$a] must be equalent $b[$cid] because $a=-32766 and $cid=-32766 but the last came from odbc. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29600&edit=1