store procedure on odbc-DB2

From: Date: Fri, 04 Feb 2005 02:41:06 +0000
Subject: store procedure on odbc-DB2
Groups: php.db 
Request: Send a blank email to php-db+get-38471@lists.php.net to get a copy of this message
Hi there everyone, I use *nix-ODBC to connect DB2 server. When i called a store procedure within an iteration, i got some "no rows found" message (not all store procedure calling) on odbc_result_all. But actually that SP calling has a result when I tested it on BD2 command central. Then when I called again store procedure that give no result, I got the result. I don't know why it happen :( Maybe someone give me some explanation :) Thanks, <snip-code> .... foreach ($arr as $key) { $sql = "call mystore('".$key."')"; $res = odbc_exec($conn, $sql); $val = odbc_result($res, 1); odbc_result_all($res); // if no rows found if (!$val) {
      $sql = "call mystore('".$key."')";
      $res = odbc_exec($conn, $sql);
      odbc_result_all($res);  // --> this give result (with same SP)
} } .... </snip-code> Tatang Widyanto

« previous php.db (#38471) next »