|
הרשם | ![]() |
שאלות ותשובות | ![]() |
רשימת חברים | ![]() |
לוח שנה | ![]() |
הודעות מהיום | ![]() |
חיפוש | ![]() |
|
![]() |
![]() |
|
כלים לאשכול | תצורת הצגה |
![]() |
# 1 |
מתאורר / יצא בחוץ
|
איך עושים חלוקה לעמודים ? ניסיתי את המדריכים ולא הצלחתי
בבקשה..מישהו יכול להסביר לי צעד צעד ?
תודה. |
![]() |
![]() |
# 2 |
אין כמו ב127.0.0.1
|
תראה, אתה שולף תוצאות מהמסד.
לMySQL יש תכונה שנקראת LIMIT שמאפשרת לך לשלוף מספר מסויים של עמודות ולא הכל. החלוקה לעמודים עושה מספר פעולות חשבוניות פשוטות (עיגול, חילוק, כפל וחיבור נדמה לי) כדי להגיע מהעמוד שאתה בו עכשיו למצב בו הדף יודע מאיזה עמודה לשלוף (LIMIT). למשל, LIMIT 5 יתן לך את כל העמודות המתחילות מהעמודה החמישית.. LIMIT 5,5 יתן לך 5 עמודות המתחילות מהעמודה החמישית. זהו =] |
![]() |
![]() |
# 3 |
חבר פורום
|
אם אני לא טועה, LIMIT 5 יתן לך את 5 העמודות הראשונות, ולא את העמודה החמישית ומעלה...
__________________
ניר, מתכנת PHP מקצועי עם ידע ויכולות מוכחות. צור קשר: MSN Messanger: MasterNir@gmail.com E-mail: MasterNir@gmail.com ICQ #: 171963672 |
![]() |
![]() |
# 4 |
אין כמו ב127.0.0.1
|
לא.. LIMIT 0,5 יתן לך את ה5 הראשונות...
|
![]() |
![]() |
# 5 |
Fatal Error
|
השיטה הכי יעילה לבצע חלוקה לעמודים אני חושב שזו עם שאילתת WHERE NOT IN מקוננת.
[נכתב בתגובה ל bluenose]
__________________
eLad Last edited by eLad; 19-04-06 at 15:25.. |
![]() |
![]() |
# 6 | |
חבר פורום
|
ציטוט:
כמו שכתוב באתר הרשמי של MySQL: קוד:
The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be non-negative integer constants (except when using prepared statements). With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1): SELECT * FROM tbl LIMIT 5,10; # Retrieve rows 6-15 To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. This statement retrieves all rows from the 96th row to the last: SELECT * FROM tbl LIMIT 95,18446744073709551615; With one argument, the value specifies the number of rows to return from the beginning of the result set: SELECT * FROM tbl LIMIT 5; # Retrieve first 5 rows In other words, LIMIT row_count is equivalent to LIMIT 0, row_count.
__________________
ניר, מתכנת PHP מקצועי עם ידע ויכולות מוכחות. צור קשר: MSN Messanger: MasterNir@gmail.com E-mail: MasterNir@gmail.com ICQ #: 171963672 |
|
![]() |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|