Row ပေါင်းများစွာ

ဒီနေ့ Database ထဲက Row ပေါင်း ၇ သောင်းလောက် ကို ဘယ်လို Display ပြရင်ကောင်းမလဲဆိုတာ စဉ်းစားမိတယ်။ အခု လုပ်နေတဲ့ Project က row ပေါင်း ၇ သောင်းကျော်မယ်တဲ့။ အခုစမ်းနေတာ ၂၀၀၀ လောက်တင် Datagridview မှာ သိပ်အဆင်မပြေဘူး။ နောက်တော့ web မှာလို page တွေ ခွဲထုတ်ဖို့ ဆုံးဖြတ်လိုက်တယ်။ Access မှာတော့ MySQL Limit မရှိဘူး။ wiki1 အကူအညီနဲ့ Top နဲ့ လုပ်ရတယ် ဆိုတာ သိသွားတယ်။

Access မှာ
page 1 မှာ ၅၀ ပြပြီးသွားရင် page 2 ကို
select top 50 * from table where ID Not IN (select top 50 * from table)

အဲလိုလေး ပြန်ထိန်းရတယ်။ နောက်ကတော့ where နဲ့ filter ပြန်လုပ်ရတယ်။ ပါပြီးသား ID တွေ မဟုတ်တာဆိုပြီး ရွေးထုတ်လိုက်တဲ့ ပုံလေးပေါ့။ page ခွဲပုံ idea ကိုတော့

http://code.mysteryzillion.org/article/separate-page-from-row-record

မှာ ဖတ်နိုင်ပါတယ်။ ကျွန်တော်တို့တွေအနေနဲ့ record တွေများလာလေလေ… အများကြီးကို တစ်ခါတည်း တန်းမပြပဲ page လေးတွေ ခွဲလိုက်ခြင်းဟာ အသုံးပြုသူအတွက် တော်တော်အဆင်ပြေစေပါတယ်။ Memory သုံးတာ တော်တော်သက်သာသွားတယ်။ Database သုံးတာ တော်တော်သက်သာသွားတယ်။ အခုတော့ အဆင်ပြေသွားပါပြီဗျာ။


  1. http://en.wikipedia.org/wiki/Select_(SQL)#Limiting_result_rows []

One thought on “Row ပေါင်းများစွာ

  1. MZ မှာ ကျွန်တော်လဲ ရေးထားတာ တစ်ခုရှိသေးတယ်ဗျ။ Custom Paging with SQL Storedprocedure ဆိုပြီးတော့။

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>