sqlrelay sample code / prepare statement / bind value 寫法

3ae0efb3712cf634d78c33a54bd460ca

include dirname(__FILE__) . '/local_config.php';
$__oradb=_fn_connect_sqlrelay();
$__oradb->setOption('portability', DB_PORTABILITY_LOWERCASE);

$sql = '
select g_no,ctrl_rowid,g_storage,g_img
from goods_file
where g_no=?
';

foreach ( $items as $g_no => $v ) {
  $prepare = $__oradb->prepare($sql);
  $result = $__oradb->execute($prepare,$g_no);
  if ( $result ) {
    $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
    $items[ $g_no ]['ctrl_rowid'] = $row['ctrl_rowid'];
    $items[ $g_no ]['g_storage'] = $row['g_storage'];
    $items[ $g_no ]['g_img'] = $row['g_img'];
    $result->free();

  } else continue;
}
$__oradb->disconnect();

Comments are closed.

Related URL:
  1. Protected: special oracle SQL command , prevent join
  2. [case] compare Oracle : select …. in (…) / or … explain result
  3. Protected: strange problem, RAC , ORACLE data block corrupted (file # %s, block # %s)
  4. oracle export / import command
  5. Protected: oracle 的一些 SOP command
  6. Maximum Availability Architecture – Oracle Streams Configuration Best Practices
  7. [設定/memo] PL/SQL Developer , plsql 免設 tnsname 檔的方法
  8. Protected: [memo] Streams process
  9. Protected: oracle standby SOP
  10. 使用 mysql partition table sample