Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

MySQL Data Type Help! Thanks

Discussion in Web Development started by Yahoo, Jun 6, 2014

  1. May 5, 2011
    Posts
    BEEN LONG everyone!
    So I am having issues with this MySQL workbench. According to my assignment, I am creating a bug tracking system. I need to add a part to the table where I will state how long each bug report has been in each state. So for example,

    Status:
    Open
    Assigned
    In Work
    Close

    Re-wording:
    I think I got the idea but i am not sure, correct me if i am wrong....

    Did some research, and I see people say to use the TIME syntax for keeping a span of time. Now the question is, how is the table suppose to set it up for 4 status? without having to go over 7 tables including other tables.

    Thanks!
    • Like Like x 1
      Hevn, Jun 6, 2014 Last edited by Yahoo, Jun 6, 2014
    • Feb 1, 2011
      Posts
      Hi Yahoo!! I don't know anything about MySQL but it's good to see ya around!
    • May 5, 2011
      Posts
      Hey! haha thanks. Nice to see everyone too :grin:
      • Friendly Friendly x 1
      • Aug 2, 2010
        Posts
        Add some columns. smalldatetime columns with some nvarchar columns will suffice in keeping track. It's easy to keep things separated. A user can select whether a bug is open, assigned, in work, or closed and that will solve that. Use a dropdown selection field in the user interface.
        • Like Like x 1
        • Apr 9, 2012
          Posts
          [IMG]
          MySQL sounds like Chinese :frown: Good luck with the problem!
        • May 5, 2011
          Posts
          Ah ok. Thanks!
        • Nov 11, 2011
          Posts
          Not sure if I understood your question properly but I took a quick shot at it. I'm sure I'm still using some deprecated commands but should work fine with MySQL 5.5 or maybe even 5.6/5.7. This is just to give you somewhat of an idea what to do, don't just replicate it because it won't work as you intend it. You still need to have a front-end to submit or pull values, etc.

          [IMG]
          Post Merged, Jun 6, 2014
          Also, welcome back and it's nice to have you back on board. :party:
          • Artistic Artistic x 1
          • May 6, 2012
            Posts
            sajak solution is almost perfect, but they want the timestamps of all states
            Thus you need to have the bugid to be there multiple time and you can drop the column updated as it shouldn't be allowed to modify that table.
            Only thing possible is changing the state which create a new row so you have all states for 1 specific bug + when it was created.

            Odds are if they ask for future development they would ask you to do a state diagram
            http://en.wikipedia.org/wiki/State_diagram
            Basically some restriction like from state close you can't go directly to state in work, but only to state re-open + reason etc...

            gluck