>mysql db¸¦ ºÒ·¯¿Â ÈÄ¿¡´Â
>mysql_close($db);¸¦ ÀÌ¿ëÇؼ ´Ý¾ÆÁà¾ß ÇÑ´Ù°í
>¾Ë°íÀÖ½À´Ï´Ù.
>±×·±µ¥ ÇÑ°¡Áö ±Ã±ÝÇÑÁ¡ÀÌ ÀÖ½À´Ï´Ù.
>Á¤È®È÷ ¾î´À ½ÃÁ¡¿¡¼ ´Ý¾ÆÁà¾ß Çϴ°ǰ¡¿ä?
>
>$db=mysql_connect("$host","$user","$password");
>mysql_select_db("$dataname", $db);
>¸¦ Çѹø ÀûÀ»¶§¸¶´Ù ¾Æ·¡ ¾î´À°÷¿¡ Çѹø¾¿
>mysql_close($db);¸¦ ÀÌ¿ëÇؼ ´Ý¾ÆÁִ°ÍÀÎÁö
>¾Æ´Ï¸é
>
>$searh_result=mysql_query("select * from $board where
>category_title",$db);¿Í °°ÀÌ Äõ¸®¸¦ »ç¿ëÇÑÈÄ¿¡
>mysql_close($db);·Î db¸¦ ´Ý´Â°ÍÀÎÁö ±Ã±ÝÇÕ´Ï´Ù.
>±×¸®°í ¸¸¾à¿¡ ´Ý¾Æ³õÁö ¾Ê¾Ò´Ù¸é ÇØ´ç db´Â ´Ù½Ã
>mysql_select_db¸¦ ÇÏÁö ¾Ê¾Æµµ ¾µ¼ö ÀÖ´Ù´Â ¸»ÀÎÁö
>±Ã±ÝÇÕ´Ï´Ù.
¾È³çÇϼ¼¿ä, HappyCGI ÆÀÀÇ voposÀÔ´Ï´Ù.
mysql_close() ÇÔ¼ö¸¦ ½á¼ ¹Ýµå½Ã ¿¬°áÀ» ²÷¾îÁÙ ÇÊ¿ä´Â ¾ø½À´Ï´Ù. ½ºÅ©¸³Æ®°¡
³¡³ª´Â ½ÃÁ¡¿¡¼ ÀÚµ¿À¸·Î ¿¬°áÀ» ²÷¾îÁý´Ï´Ù. ±×·¯³ª, ¿¬°áÀ» ²÷¾îÁÖ´Â°Ô ÁÁÀº
½À°üÀ̶ó°í ¾ê±â¸¦ ÇÕ´Ï´Ù. ¸Þ´º¾óÀ» Âü°íÇϼ¼¿ä.
http://www.php.net/manual/en/function.mysql-close.php
mysql_close() ÇÔ¼ö´Â mysql_connect() ÇÔ¼ö¿Í °ü·ÃÀÌ ÀÖ½À´Ï´Ù. ¾îµð¼ ²÷¾îÁà
¾ß´ÂÁö´Â »ý°¢Çغ»´Ù¸é mysql_connect()°¡ µÇ¾î ÀÖ´Â »óÅ¿¡¼ ÇؾßÇÏ´Â ºÎºÐÀÌ
³¡³ µÚ¿¡ ÇØÁà¾ß°ÚÁÒ. mysql_query()¸¦ ÇϱâÀü¿¡ ²÷¾î¹ö¸®¸é ¾ÈµÉ°Ì´Ï´Ù.
°£´ÜÇÏ°Ô Å×½ºÆ® Çغ¸½Ã°í ±Û¿Ã·Á ÁÖ½Ã¸é ¾î¶³±î¿ä?
°¨»çÇÕ´Ï´Ù.
- vopos
|