mysql:4133
From: A Tsukui <A Tsukui <milano@xxxxxxxxxx>>
Date: Fri, 03 Aug 2001 16:55:12 +0900
Subject: [mysql 04133] Re: MySQL INSERT ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤Ç¤¤Ê¤¤
¤Î¤Ö¤ò¤Ç¤¹¡£ º¤¤Ã¤Æ¤¤¤ë¾õ¶·¤Ï¡¢Á´¤¯¿·¤·¤¤¥ì¥³¡¼¥É¤¬ºî¤é¤ì¤Ê¤¤¤È¸À¤¦¤³¤È¤Ç¤¹¤«¡© ¤½¤ì¤È¤â¡¢°Õ¿Þ¤È°ã¤¦¥Ç¡¼¥¿¤¬ÁÞÆþ¤µ¤ì¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¤«¡© ¿·¤·¤¤¥ì¥³¡¼¥É¤¬ºî¤é¤ì¤Ê¤¤¾ì¹ç¡£ kaimono ¥Æ¡¼¥Ö¥ë¤Ï¤É¤Î¤è¤¦¤Ê¹½À®¤Ç¤¹¤«¡© kategorii ¤Î¾¤Ë¥«¥é¥à¤Ï¤¢¤ê¤Þ¤»¤ó¤«¡© ¤½¤ì¤¬ not null ¤Ë¤Ê¤Ã¤Æ¤¿¤ê¤¹¤ë¤È¡¢¥¨¥é¡¼¤¬µ¯¤¤ë¤Ç¤·¤ç¤¦¡£ °Õ¿Þ¤È°ã¤¦¥Ç¡¼¥¿¤¬ÁÞÆþ¤µ¤ì¤ë¾ì¹ç¡£ ¢ä $sth = $dbh->prepare(qq{insert into kaimono (kategorii) ¢ävalues("kategorii")}); ¤ÎÉôʬ¡¢values ¤Î¸å¤¬¡¢"kategorii" ¤Ç¤Ï¤Ê¤¯¡¢"$kategorii" ¤Ç¤¹¡£ ¤³¤ì¤Ï¡¢¤É¤Á¤é¤Î¾õ¶·¤Ë¤»¤è½¤Àµ¤¹¤Ù¤¤Ç¤¹¤Í¡£ $sth = $dbh->prepare(qq{insert into kaimono (kategorii) values (?)}); $sth->execute($kategorii); ¤Èplaceholder¤ò»ÈÍѤ¹¤ë¤³¤È¤ò¥ª¥¹¥¹¥á¤·¤Þ¤¹¡£ On Fri, 3 Aug 2001 16:26:25 +0900 "tamuzin2" <tamuzin@xxxxxxxxxx> wrote: ¢äÅÄÃæ¤Ç¤¹¡£ ¢ä ¢ä²¼µ¤Î¤è¤¦¤Ê£Ð£å£ò£ì¤Ç¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÁàºî¤¹¤ë¥×¥í¥°¥é¥à¤òºîÀ®¤·¤¿¤Î¤Ç¤¹¤¬¡¢ ¢ä¥Õ¥©¡¼¥à¤«¤éÁ÷¿®¤·¤¿¥Ç¡¼¥¿¤¬¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÁÞÆþ¤µ¤ì¤Ê¤¯¤Æº¤¤Ã¤Æ¤¤¤Þ¤¹¡£ ¢ä¤É¤Ê¤¿¤«²¼µ¤Î¥×¥í¥°¥é¥à¤Î¤É¤³¤¬°¤¯¤Æ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÁÞÆþ¤µ¤ì¤Ê¤¤¤Î¤«¤ª¶µ¤¨¤¯ ¢ä¤À¤µ¤¤µ¹¤·¤¯¤ª´ê¤¤Ãפ·¤Þ¤¹¡£ ¢ä ¢ä#!perl ¢ä ¢ärequire"jcode.pl"; ¢ä ¢äuse DBI; ¢äuse CGI_Lite; ¢ä ¢ämy($dns) = "DBI:mysql:shopping:localhost"; ¢ämy($username) = "root"; ¢ämy($password) = "aaaa"; ¢ämy($dbh,$sth); ¢ämy(@ary); ¢ä ¢ä$RemoteUser=$ENV{'REMOTE_USER'}; ¢ä ¢ä$cgi=new CGI_Lite(); ¢ä%in=$cgi->parse_form_data(); ¢äprint"Content-type: text/plain\n\n"; ¢ä ¢ä#¿·µ¬ÅÐÏ¿½èÍý ¢äif($in{'mode'} eq 'new'){ ¢ä &Error("µÆþϳ¤ì¤¬¤¢¤ê¤Þ¤¹¡£") unless $in{'kategorii'}; ¢ä ¢ä #¤³¤³¤Ç¤ÏEUC¥³¡¼¥É¤Ç¥Ç¡¼¥¿¤òÁÞÆþ¤·¤Æ¤ß¤ë»ö¤Ë¤¹¤ë¡£É½¼¨¤ÏSJIS¤òÍøÍÑ ¢ä $kategorii=$in{'kategorii'}; ¢ä &jcode'convert(*kategorii,"euc"); ¢ä ¢ä $dbh = DBI -> connect ($dns,$username,$password) or &Error("¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ø ¢ä¥¢¥¯¥»¥¹¤Ç¤¤Þ¤»¤ó¡£"); ¢ä ¢ä $sth = $dbh->prepare(qq{insert into kaimono (kategorii) ¢ävalues("kategorii")}); ¢ä ¢ä $sth -> execute() or &Error("MySQL INSERT ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤Ç¤¤Þ¤»¤ó¡£"); ¢ä ¢ä $sth -> finish(); ¢ä $dbh -> disconnect(); ¢ä}#¿·µ¬ÅÐÏ¿½èÍý¤Ï¤³¤³¤Þ¤Ç ¢ä ¢ä $dbh = DBI -> connect ($dns,$username,$password) or &Error("¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ø ¢ä¥¢¥¯¥»¥¹¤Ç¤¤Þ¤»¤ó¡£"); ¢ä ¢ä $sth = $dbh->prepare(qq{select * from kaimono}); ¢ä ¢ä $sth -> execute() or &Error("select * from kaimono¤ò¼Â¹Ô¤Ç¤¤Þ¤»¤ó¡£"); ¢ä ¢ä $sth -> finish(); ¢ä $dbh -> disconnect(); ¢ä ¢ä ¢äprint "content-type: text/html\n\n"; ¢äprint<<"__HTML__"; ¢ä<html><head><title>¥·¥ç¥Ã¥Ô¥ó¥°´ÉÍý¥Ú¡¼¥¸</title></head> ¢ä<body text="#44444" bgcolor="#ffffff"> ¢ä<table width="32%" border="0" cellspacing="1" cellpadding="1" ¢äalign="center"> ¢ä <tr> ¢ä <td> ¢ä <h2 align="center">¢¡¥·¥ç¥Ã¥Ô¥ó¥°´ÉÍý¥Ú¡¼¥¸¢¡</h2> ¢ä </td> ¢ä </tr> ¢ä</table> ¢ä<br> ¢ä<br> ¢ä<form method="post" action="kaimono.cgi"> ¢ä <table width="70%" border="3" cellspacing="4" cellpadding="5" ¢äalign="center"> ¢ä <tr> ¢ä <td width="21%" bgcolor="#99CCFF"> ¢ä <div align="center"><font size="3"><b>¥«¥Æ¥´¥ê¡¼</b></font></div> ¢ä </td> ¢ä <td width="79%" bgcolor="#FDF9C1"> ¢ä <select name="kategorii"> ¢ä <option>±ÇÁüµ¡´ï</option> ¢ä <option>µ²±ÁõÃÖ</option> ¢ä <option>¥Ç¥£¥¹¥×¥ì¥¤</option> ¢ä <option>¥Í¥Ã¥È¥ï¡¼¥¯µ¡´ï</option> ¢ä <option>ÆþÎÏÁõÃÖ</option> ¢ä <option>£Ð£ÃËÜÂÎ</option> ¢ä <option>¥×¥ê¥ó¥¿¡¼</option> ¢ä <option>²»À¼µ¡´ï</option> ¢ä <option>¥½¥Õ¥È</option> ¢ä <option>¥¹¥¥ã¥Ê¡¼</option> ¢ä </select> ¢ä </td> ¢ä </tr> ¢ä <input type="hidden" name="mode" value="new"> ¢ä <tr> ¢ä <td colspan="2"> ¢ä <div align="center"> ¢ä <input type="submit" name="Submit" value="¾¦ÉÊÅÐÏ¿"> ¢ä </div> ¢ä </td> ¢ä </tr> ¢ä </table> ¢ä</form> ¢ä__HTML__ ¢ä ¢äsub Error{ ¢ä#print "content-type: text/html\n\n"; ¢äprint $_[0]; ¢äprint qq(<br><a href="javascript:history.back(1)">Ìá¤ë</a>); ¢äexit; ¢ä} ¢ä ¢ä²ò¤ê¤Ë¤¯¤¤¥×¥í¥°¥é¥à¤Ç¿½¤·Ìõ¤´¤¶¤¤¤Þ¤»¤ó¤¬µ¹¤·¤¯¤ª´ê¤¤¤¤¤¿¤·¤Þ¤¹¡£ ¢ä
4109 2001-08-01 10:55 ["tamuzin2" <tamuzin@] ¥Ð¥¤¥Ê¥ê¡¼¥Ç¡¼¥¿¤ò°·¤¦ÊýË¡¤Ï¡© 4121 2001-08-03 00:17 ¨±[Tatsuhiko Miyagawa <] 4122 2001-08-03 01:04 ¡¡¨²["tamuzin2" <tamuzin@] 4124 2001-08-03 06:08 ¡¡¨¨±[Tatsuhiko Miyagawa <] 4131 2001-08-03 16:26 ¡¡¨¡¡¨±["tamuzin2" <tamuzin@] 4132 2001-08-03 16:26 ¡¡¨±["tamuzin2" <tamuzin@] MySQL INSERT ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤Ç¤¤Ê¤¤ -> 4133 2001-08-03 16:55 ¡¡¡¡¨±[A Tsukui <milano@xxx] 4134 2001-08-03 17:31 ¡¡¡¡¡¡¨±["tamuzin2" <tamuzin@] Re: MySQL INSERT ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤Ç¤¤Ê¤¤¡Ú²ò·è¡Û 4135 2001-08-03 17:52 ¡¡¡¡¡¡¡¡¨²["Kawai,Takanori" <GC] 4136 2001-08-03 18:07 ¡¡¡¡¡¡¡¡¨±[Yasuhide OMORI / Âç¿] placeholder (Re: MySQL INSERT ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤Ç¤¤Ê¤¤¡Ú²ò·è¡Û) 4137 2001-08-03 18:58 ¡¡¡¡¡¡¡¡¡¡¨±["tamuzin2" <tamuzin@]