½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
asp
css
mysql
html
jquery
������
image
mobile
API
slide
°Ô½ÃÆÇ
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 111 | Á¶È¸¼ö 3,384 | µî·ÏÀÏ 2001-06-09 11:02:26

´Ð³×ÀÓ

vopos

À̸ÞÀÏ

vopos@happycgi.com

Á¦¸ñ

[´äº¯] [Áú¹®] °Ô½ÃÆÇ¿¡¼­ ´äº¯À» ÀúÀå...mysql....
³»¿ë
>°Ô½ÃÆÇ¿¡¼­ ´äº¯À» happycgi¿Í °°ÀÌ Áú¹® ¹Ù·Î ¹Ø¿¡ Ãâ·ÂÀÌ µÇ°Ô ÇÏ·Á°í
>Çϴµ¥¿ä.... mysql¿¡¼­ µ¥ÀÌÅ͸¦ »ðÀÔÇÒ¶§ insert into Çϸé
>Á¦ÀÏ ¹Ø¿¡ Â÷·Ê´ë·Î ½×ÀÌÀÚ³ª¿ä?
>¾î¶»°Ô Áú¹®-´äº¯À» ±¸ÇöÇØ ³¾¼ö ÀÖÁÒ?


¾È³çÇϼ¼¿ä, HappyCGI ÆÀÀÇ voposÀÔ´Ï´Ù.

ÀÌÀü¿¡ ºñ½ÁÇÑ Áú¹®¿¡ ´ëÇÑ ±ÛÀÌ ÀÖ¾ú´Âµ¥ ¾Æ¹«¸® ãÀ»·¡µµ ¾ÈµÇ´Â±º¿ä.

Æ÷·³½º·¹µå¸¦ Çس»´Â ¹æ¹ýÀº ¸î°¡Áö°¡ Àִ°ɷΠ¾Æ´Âµ¥ ÇØÇÇ¿¡¼­ »ç¿ëÇÏ´Â ¹æ½Ä
À» °£´ÜÇÏ°Ô ¼³¸íµå¸®°Ú½À´Ï´Ù.

¸ÕÀú Æ÷·³Å×ÀÌºí¿¡ ½º·¹µåÇü½ÄÀ» À§ÇØ ÇÊ¿äÇÑ Ä÷³À» ´ÙÀ½Ã³·³ Àâ½À´Ï´Ù.

articleId INT AUTO_INCREMENT PRIMARY KEY,
threadId INT NOT NULL,
replyId CHAR(50) NOT NULL,


articleId => ±ÛÀÇ °íÀ¯ÇÑ ¹øÈ£
threadId´Â => ¾î¶² ½º·¹µåÀÇ ÃÖ»óÀ§ ±ÛÀÇ articleId

replyId´Â "¼ýÀÚ-¼ýÀÚ-¼ýÀÚ" Çü½ÄÀÔ´Ï´Ù. ¸¸ÀÏ articleIdÀÇ Ã¹¹ø° ´äº¯±ÛÀº 1-01,
µÎ¹ø° ´äº¯±ÛÀº 1-02, articleId 1ÀÇ ´äº¯±ÛÀÇ ´äº¯±ÛÀº 1-01-01, ´äº¯±ÛÀÇ µÎ¹ø
° ´äº¯±ÛÀº 1-01-02°¡ µÇ´ÂÇü½ÄÀÔ´Ï´Ù.

¾î¶² ±ÛÀÇ Æ¯Á¤ ±íÀÌ(depth)ÀÇ ´äº¯±ÛÀÌ ¸î°³ÀÎÁö¸¦ ¾Ë¾Æ³»¾ß°ÚÁÒ? ±×·¡¾ß ±× °¹
¼ö¿¡ ¶§¶ó ¹øÈ£¸¦ ¸Å°Ü ÀúÀåÀ» Çؾߴϱî¿ä. ±×°Ç Á÷Á¢Çغ¸¼¼¿ä, Àç¹ÌÀÖÀ»°Ì´Ï´Ù.

½º·¹µå ¸®½ºÆ®¸¦ Ãâ·ÂÇÒ ¶§´Â ¿ä·±½ÄÀ¸·Î...

SELECT * FROM tbl_name ORDER BY threadId DESC,replyId;

¼³¸íµå¸° ¹æ½ÄÀº ÀúÀåÇϱⰡ ÈûµéÁö¸¸ ½º·¹µå Ãâ·ÂÀº °£´ÜÇÏ´Ù´Â ÀåÁ¡ÀÌ ÀÖ½À´Ï´Ù.


°¨»çÇÕ´Ï´Ù.

- vopos

/----------------------------------------------------------------------------------------------------
ÀÚÁÖ¹¯´Â Áú¹® Æ÷·³°ú Æ÷·³°Ë»öÀ» ÀÌ¿ëÇϼż­ ºñ½ÁÇÑ Áú¹®ÀÇ ´äº¯ÀÌ ÀÖ´ÂÁö
È®ÀÎÇÏ½Ã°í ±Û ¿Ã·ÁÁÖ½Ã±æ ºÎŹµå¸³´Ï´Ù.
----------------------------------------------------------------------------------------------------/
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û Å©·¹ÀÌÁö º¸µå ¸»ÀÔ´Ï´Ù... 2001-06-09 02:07:11
´ÙÀ½°Ô½Ã±Û ÀÚ·á½Ç ÀÚ·á¿Ã¸®´Â ¹ýÁ»... 2001-06-09 14:40:05