Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
Video Content Creator
pramukag
Updated:
Today at 6:10 AM
Ad icon
QA Engineer Intern
pramukag
Updated:
Today at 6:07 AM
Ad icon
Sell your Land, House on idamata.lk for FREE
sajith.xp.pk
Updated:
Thursday at 9:03 AM
Handmade Character Soft Toys
anil1961
Updated:
Tuesday at 2:11 PM
Bodim.lk out now !
Manoj Suranga Bandara
Updated:
Jun 21, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
ElaKiri Programmer's Club
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="TNHM" data-source="post: 23416143" data-attributes="member: 561032"><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">මෙහෙමයි බන්. ඔය auto id sequence එකක් නම් 1,2,3,4,5,6... වගේ ඒ කියන්නේ මේක ගොඩක් වෙලාවට database එකේ තියෙන auto increment id එක. මේක නම් කලින් හරියටම දැන ගන්න විදියක් නැ. කරන්න තියෙන එකම දේ id එකෙන් desending සොර්ට් කරලා පලවෙනි id එක අරගෙන එකට එකක් එකතු කරලා පෙන්නන (newId = id + 1). මේක වරදින තැනක් එනවා උබේ සිස්ටම් එකේ requirement එක අනුව.</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">එහෙමත් නැතුව unique id එකක් නම් ඕනේ auto increment නැතුව 12HGA, 86YUE, OO626 වගේ. ලේසියෙන්ම පුළුවන්. මොකක් හරි random string ජෙනේරේටර් එකකින්. ජෙනේරේට් කරලා database find එකක් දාලා බලන්න already exists ද කියලා. ඔය id එකේ දිග වැඩි වෙන්න වැඩි වෙන්න repeat වෙන්න තියෙන chance එක අඩුයි. නැත්නම් ලේසියෙන්ම UUID use කරන්න පුළුවන්. <img src="/styles/default/xenforo/smilies/default/rolleyes.gif" class="smilie" loading="lazy" alt=":rolleyes:" title="Rolleyes :rolleyes:" data-shortname=":rolleyes:" /></span></p></blockquote><p></p>
[QUOTE="TNHM, post: 23416143, member: 561032"] [SIZE="4"] මෙහෙමයි බන්. ඔය auto id sequence එකක් නම් 1,2,3,4,5,6... වගේ ඒ කියන්නේ මේක ගොඩක් වෙලාවට database එකේ තියෙන auto increment id එක. මේක නම් කලින් හරියටම දැන ගන්න විදියක් නැ. කරන්න තියෙන එකම දේ id එකෙන් desending සොර්ට් කරලා පලවෙනි id එක අරගෙන එකට එකක් එකතු කරලා පෙන්නන (newId = id + 1). මේක වරදින තැනක් එනවා උබේ සිස්ටම් එකේ requirement එක අනුව. එහෙමත් නැතුව unique id එකක් නම් ඕනේ auto increment නැතුව 12HGA, 86YUE, OO626 වගේ. ලේසියෙන්ම පුළුවන්. මොකක් හරි random string ජෙනේරේටර් එකකින්. ජෙනේරේට් කරලා database find එකක් දාලා බලන්න already exists ද කියලා. ඔය id එකේ දිග වැඩි වෙන්න වැඩි වෙන්න repeat වෙන්න තියෙන chance එක අඩුයි. නැත්නම් ලේසියෙන්ම UUID use කරන්න පුළුවන්. :rolleyes:[/SIZE] [/QUOTE]
Insert quotes…
Verification
Payakata winadi keeyak tibeda?
Post reply
Top
Bottom