Sunday, October 30, 2011

[WD&D] Digest for sitedesign@googlegroups.com - 4 Messages in 1 Topic

Group: http://groups.google.com/group/sitedesign/topics

    ernest okojie <nestkojex@gmail.com> Oct 30 06:20PM +0100  

    How can I number my results where the lowest ID is #1 and the highest
    ID is the #numberOfResults
     
    Example: If I have a table with only 3 rows in it. whose ID's are 24,
    87, 112 it would pull like this:
     
    ID 24 87 112
    Num 1 2 3
     
    The reason why I want this, is my manager wants items to be numbered
    like item1, item2, etc. I initially made it so it used the ID but he
    saw them like item24, item87, item112. He didn't like that at all and
    wants them to be like item1, item2, item3. I personally think this is
    going to lead to problems because if you are deleting and adding
    items, then item2 will not always refer to the same thing and may
    cause confusion for the users. So if anyone has a better idea I would
    like to hear it.
     
    Thanks.
     
     
    --
    Best Regards
    www.kojexconsult.com

     

    Joni Mueller <joni@jonimueller.com> Oct 30 12:21PM -0500  

    You are absolutely right if the ID is the item number, it must be unique; his way won't work then, whether he wants to hear it or likes it or not. :)
     
    Good luck with it; sorry I can't be more help other than to side with you. :)
    Joni Mueller
    Pixelita Designs
    http://www.pixelita.com
    ________________________________________
    From: sitedesign@googlegroups.com [sitedesign@googlegroups.com] On Behalf Of ernest okojie [nestkojex@gmail.com]
    Sent: Sunday, October 30, 2011 12:20 PM
    To: sitedesign@googlegroups.com
    Subject: [WD&D] generating sequential number
     
    How can I number my results where the lowest ID is #1 and the highest
    ID is the #numberOfResults
     
    Example: If I have a table with only 3 rows in it. whose ID's are 24,
    87, 112 it would pull like this:
     
    ID 24 87 112
    Num 1 2 3
     
    The reason why I want this, is my manager wants items to be numbered
    like item1, item2, etc. I initially made it so it used the ID but he
    saw them like item24, item87, item112. He didn't like that at all and
    wants them to be like item1, item2, item3. I personally think this is
    going to lead to problems because if you are deleting and adding
    items, then item2 will not always refer to the same thing and may
    cause confusion for the users. So if anyone has a better idea I would
    like to hear it.

     

    ernest okojie <nestkojex@gmail.com> Oct 30 06:37PM +0100  

    actually, the essence is to create a simple ordered list from the
    databse that will not be affected by the deleted rows and ids in the
    table. So the lay man out there can actually see an ordered number
    rows without realy bordering about the ids.
     
     
    --
    Best Regards
    www.kojexconsult.com

     

    Jio <jioman7@gmail.com> Oct 30 12:40PM -0700  

    Check this out..i created it when i was younger and ran a test server for a
    game..
    Anyhow, Its ordered by id but the numbers that are rendered are created in
    the code
    Assuming you have knowledge in mysql and whatnot..if this is what your
    trying to achieve feel free to use and abuse it =p
    Link to code:
    http://pastebin.com/KvgqTCd1
     
    And the attachment is a screenshot of how it looks.
     

     

You received this message because you are subscribed to the Google Group sitedesign.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
You received this because you are subscribed to the "Web Design and Development" group at Google Groups. Messages are prefixed with [WD&D] in the subject. No spam is allowed. Be civil, be professional; try to be helpful & mind your netiquette. All posts are Copyright the original author and the Web Design and Development group. No reproduction of this content is allowed in any electronic or printed form outside the group at Google Groups and the http://www.WDaDg.org website. Any unauthorized use of our copy constitutes illegal Copyright infringement and may well be prosecuted to the full extent of the law. Digital Signature: $©"[W|D|&|D]g"|^|!SiteDesign@GG||#%$
To post to this group, email SiteDesign@googlegroups.com
To unsubscribe, email SiteDesign-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/SiteDesign?hl=en

No comments:

Post a Comment