Warning: include(/virtual/grimo/public_html/blog.grimonet.com/php_func.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 1

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/php_func.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 1

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/static_header.html): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 6

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/static_header.html' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 6

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/static_meta_blog.html): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 8

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/static_meta_blog.html' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 8
INOLOG Ver.2: 2012年2月 アーカイブ

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/static_body_header.html): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 20

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/static_body_header.html' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 20

« 2012年1月 | メイン | 2012年3月 »

2012年2月

2012年2月16日(木)

INSERT ... ON DUPLICATE KEY UPDATE 構文ってどんな場合に使うの?

MySQL でデータを挿入する時に、重複するレコードが存在すれば UPDATE、無ければ INSERT みたいな事をしたい場合、REPLACE を使えばいいと思っていたのですが、色々と調べてみると「INSERT ... ON DUPLICATE KEY UPDATE 構文」なるものがあって、どちらかと言うとそちらの方が期待している動作に近いことが分かったので、色々と試してみました。


続きを読む »


Warning: include(/virtual/grimo/public_html/blog.grimonet.com/google_468_60.html): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 137

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/google_468_60.html' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 137

2012年2月 2日(木)

phpのセッションのガーベッジコレクションとかあれこれ

php で利用するセッション情報を MySQL に保存する方式に変更しようとしていたら、結構いろいろな設定があることに気が付いたので備忘録的な意味も込めてメモ。

今回のネタはだいたい以下の3つ。

// セッションで利用するクッキーの有効期間を1日に
ini_set("session.cookie_lifetime", 86400);

// 1日以上たったセッション情報を消去
ini_set("session.gc_maxlifetime", 86400);

// ガーベッジコレクションを毎回発生させる
ini_set('session.gc_probability', 100);

続きを読む »

« 2012年1月 | メイン | 2012年3月 »


Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_522.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_522.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_245.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_245.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_252.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_252.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_206.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_206.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/track_word_249.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/track_word_249.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_250.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_250.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_251.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_251.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_246.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_246.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_248.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_248.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/google_link_unit_247.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/google_link_unit_247.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_242.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_242.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_253.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_253.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_208.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/template_208.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/powered_by_204.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/powered_by_204.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 213

Warning: include(/virtual/grimo/public_html/blog.grimonet.com/includes_c/bodyfootjs_80.php): failed to open stream: No such file or directory in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 224

Warning: include(): Failed opening '/virtual/grimo/public_html/blog.grimonet.com/includes_c/bodyfootjs_80.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/ykinomt/grimonet.com/public_html/blog/articles/2012/02/index.php on line 224