[PHP-users 32546] Re: 入力データの MySQL への挿入について

INO-KO ino_ko @ yahoo.co.jp
2007年 8月 14日 (火) 16:54:29 JST


INO-KO です。

 ____ "Asakichi.Yoshikawa" <a-yoshikawa @ caddata.jp> wrote:
/
> $db や $res の中身を見れば原因が分かると思います。
> var_dump($db);
> あるいは
> new dBug($db);

print_r は知っていましたが、その様な便利な関数/クラスがあるのですね。

ただ、残念ながら原因を見つけることが出来ず、また $_POST の場合と直接デー
タを与えた場合を比較してみましたが違いは見つかりませんでした。


実行結果は以下の通りです。

object(db_mysql)(26) {
  phptype => string(5) mysql
  dbsyntax => string(5) mysql
  features => array(7) {
    limit => string(5) alter
    new_link => string(5) 4.2.0
    numrows => bool true
    pconnect => bool true
    prepare => bool false
    ssl => bool false
    transactions => bool true
  }
  errorcode_map => array(26) {
    1004 => int -15
    1005 => int -15
    1006 => int -15
    1007 => int -5
    1008 => int -17
    1022 => int -5
    1044 => int -26
    1046 => int -14
    1048 => int -3
    1049 => int -27
    1050 => int -5
    1051 => int -18
    1054 => int -19
    1061 => int -5
    1062 => int -5
    1064 => int -2
    1091 => int -4
    1100 => int -21
    1136 => int -22
    1142 => int -26
    1146 => int -18
    1216 => int -3
    1217 => int -3
    1356 => int -13
    1451 => int -3
    1452 => int -3
  }
  connection => resource(mysql link) 13
  dsn => array(9) {
    phptype => string(5) mysql
    dbsyntax => string(5) mysql
    username => string(4) root
    password => string(7) **********
    protocol => string(3) tcp
    hostspec => string(9) localhost
    port => bool false
    socket => bool false
    database => string(4) test
  }
  autocommit => bool true
  transaction_opcount => int 0
  _db => string(4) test
  _debug => bool false
  _default_error_mode => NULL
  _default_error_options => NULL
  _default_error_handler => string(0) 
  _error_class => string(8) DB_Error
  _expected_errors => array(0)
  fetchmode => int 1
  fetchmode_object_class => string(8) stdClass
  was_connected => NULL
  last_query => string(101) REPLACE INTO users (id, family_name) VALUES ('e94a41171422f597e61b1103c3522c5e', '
鈴木');
  options => array(8) {
    result_buffering => int 500
    persistent => bool false
    ssl => bool false
    debug => int 2
    seqname_format => string(6) %s_seq
    autofree => bool false
    portability => int 0
    optimize => string(11) performance
  }
  last_parameters => array(2) {
    0 => string(32) e94a41171422f597e61b1103c3522c5e
    1 => string(6) 鈴木
  }
  prepare_tokens => array(0)
  prepare_types => array(0)
  prepared_queries => array(0)
  _last_query_manip => bool true
  _next_query_manip => bool false
}

-- 
INO-KO
ino_ko@yahoo.co.jp


--------------------------------------
Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
http://pr.mail.yahoo.co.jp/toolbar/



PHP-users メーリングリストの案内