Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Posts
    346
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Simple numbering system

    Hello....I don't know were to start coding this, but I have search for this here & other forums. I want a number to advance by a set number of numbers based on another number. I am trying to make something like a order numbering system but it isn't for order numbers...it is for a ticket system. It is similar to a ordering system...I want the support ticket number to increase like 2 - 5 numbers from the support ticket number that was opened before this one.

    Example: I open a support ticket & my ticket # is 5000 & then you open a support ticket. I want your ticket $ to be like 5002 or 5005.

    I have random number generator script that was copied from a password script & it isn't what I need. I want to start the support ticket numbers at like 500 & increase from there. All this will be stored in the database so I need to make a query to seek out the last ticket number & just make this ticket number increase by 2 number? If so, how do I make this work.

  • #2
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Im not sure you really need to do it like that.
    Is there a particular reason why you can't number them from 1 incrementing by 1?
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #3
    Regular Coder
    Join Date
    Dec 2005
    Posts
    346
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by marek_mar
    Im not sure you really need to do it like that.
    Is there a particular reason why you can't number them from 1 incrementing by 1?
    This is just what I had in mind. The main reason is that the site doesn't get a lot of visitors right now & with the ticket #'s jumping like that then it would seem like there is more traffic to the site.

  • #4
    Regular Coder
    Join Date
    Jul 2005
    Location
    LA, California
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:
    $i 0;
    $i 5;
    print 
    $i
    or somthin along those lines
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    There are 3 kinds of ppl those who can count and those who cant
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Script-Megafest.com Coming Oh so very soon

  • #5
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    I'm trying not to laugh...
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #6
    Regular Coder
    Join Date
    Jul 2005
    Location
    LA, California
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by marek_mar
    I'm trying not to laugh...
    i didnt even really read the post just skimmed it if you laughing at me.
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    There are 3 kinds of ppl those who can count and those who cant
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Script-Megafest.com Coming Oh so very soon

  • #7
    Regular Coder
    Join Date
    Dec 2005
    Posts
    346
    Thanks
    1
    Thanked 0 Times in 0 Posts
    What is so funny? Is this possible?

  • #8
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sounds like a design flaw with what you want to do. if this is integrated with a db, you should have a ticket id, and then use relational tables to affiliate it with your ticket id. you could easily keep a count on the ticket row of the current associated tickets. if what I just said is already over your head then you will be having some trouble. anything is possible.

  • #9
    Regular Coder
    Join Date
    Dec 2005
    Posts
    346
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by fci
    sounds like a design flaw with what you want to do. if this is integrated with a db, you should have a ticket id, and then use relational tables to affiliate it with your ticket id. you could easily keep a count on the ticket row of the current associated tickets. if what I just said is already over your head then you will be having some trouble. anything is possible.
    I don't understand what you are saying. Can you simplify it? I haven't been coding in php with MySQL for too long...

  • #10
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by marek_mar
    I'm trying not to laugh...
    just go ahead.

    fast incrementing support tickets
    = a lott of support is needed
    = a lott of problems
    != a lott of trafic

    but anyway. just use an autonumber-field for your ticketID and add an additional columns that you update to ticketID*2+125 or whatever
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •