|
|
|
|
俵ÀÌ / 2001-04-23 / ¿ÀÀü 2:27:36 / 203.255.3.190
Á¶È¸¼ö : 157
|
[Áú¹®] DB¿¡¼ ·£´ýÇÏ°Ô µ¥ÀÌŸ¸¦ Ãâ·ÂÇϴ¹æ¹ýÁ».. |
> ¾È³çÇϼ¼¿ä?
> Á¦¸ñ ±×´ë·ÎÀÔ´Ï´Ù.
> DB¿¡¼ ·£´ýÇÏ°Ô ÇÑ°³ÀÇ ÇÑ°³ÀÇ µ¥ÀÌŸ¸¦ Ãâ·ÂÇÏ°í
> ½ÍÀºµ¥ ¾î¶»°Ô ÇؾߵÇÁÒ?
> ²Þ¼Ó³ª¶ó ¼Ò½ºÁß »ïÇà½Ã¿¡ ¿À´ÃÀÇ Ãßõ»ïÇà½Ãó·³...
> ¿¹¸¦ µé¾î DB¿¡ mytable¶ó´Â Å×À̺íÀÖ°í
> numÀ̶ó´Â Ä®·³ÀÖ½À´Ï´Ù. ¹°·Ð numÀº µ¥ÀÌŸ ÀÔ·ÂÇÒ¶§¸¶´Ù 1ºÎÅÍ °è¼Ó Áõ°¡ÇÏ°í±¸¿ä...
> ÀÌ»óÀÔ´Ï´Ù.
> Á» ÀÚ¼¼È÷ ¾Ë·ÁÁÖ½Ã¸é °í¸¿°Ú½À´Ï´Ù.
>
-----------------------------------------------------------
¼Ò½ºÁß¿¡ Rnd¶ó´Â ÇÔ¼ö¸¦ »ç¿ëÇÏ´Â °÷À» ã¾Æ º¸½Ã±â ¹Ù¶ø´Ï´Ù.
½ÇÁ¦ Rnd ÇÔ¼ö´Â 0º¸´Ù Å©°Å³ª °°°í 1º¸´Ù ÀÛÀº °ªÀ» ¹«ÀÛÀ§·Î µ¹·ÁÁÝ´Ï´Ù.
Rnd ÇÔ¼ö¸¦ ÀÌ¿ëÇØ ÁÖ¾îÁø ¹üÀ§ÀÇ ¹«ÀÛÀ§ Á¤¼ö¸¦ ¸¸µé·Á¸é ¾Æ·¡ °ø½ÄÀ» »ç¿ëÇÕ´Ï´Ù.
Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
upperbound´Â ¹üÀ§¿¡¼ °¡Àå Å« ¼öÀÌ°í lowerbound´Â ¹üÀ§¿¡¼ °¡Àå ÀÛÀº ¼öÀÔ´Ï´Ù.
±×¸®°í Rnd ÇÔ¼ö¸¦ »ç¿ëÇϱâ Àü¿¡´Â ¾Õ¿¡¼
Randomize¹®À» »ç¿ëÇÏ¿© ½Ã½ºÅÛ Å¸À̸ӿ¡ ±â¹ÝÇÑ ½Ãµå·Î ³¼ö ¹ß»ý±â¸¦ ÃʱâÈÇØ¾ß ÇÕ´Ï´Ù.
±×·³...
|
|
|