Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Using a list box with MySQL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using a list box with MySQL

    Hello, I have been gone quite a while from starting out using Alpha I never actually finished any apps yet, a couple years back I was trying to learn how to use Alpha and MySQL and SQL Server, the partner I had lost interest in our project. I am back with several new ideas that I believe can be accomplished using Alpha, I know I will have to upgrade to get the features I will be needing. So you know I am still new to this and realized that I had to learn how a Database should be structured and relationships work, so last fall I took a class on Database administration and design so that I had a better understanding. I am not an advanced user so please take it easy on me.

    Now what I am trying to accomplish is....
    I want to use a cascading or dropdown listbox type of entry, to for example- add items to inventory. My question is do I make a separate table that is used to supply the dropdown or cascading boxes with the values that are then saved to the inventory item's own table?
    One reason I ask this is I believe that it would be then easy for me to make a separate form type way to make changes and manage or add fields to the supplying values?

    Or would I be best off to make a table with all of the category choices and it supplies the cascading(dropdown) values and just saves the inventory items number in the category table as a foreign key?

    or should all the choices be stored in the listbox itself and then saved to the database in the inventory item's table or a separate category table?

    I am curious how others have done this, please don't over "technitalk" me suggestions because I may get lost in your explanation.

    Thanks for any input in advance.
    Jerrod
    Jerrod Sand

    #2
    Re: Using a list box with MySQL

    Hi Jerrod,

    I realise that your question are interlinked but it makes it easier to answer and others to follow if you keep it simple and ask one specific question at a time.
    I want to use a cascading or dropdown listbox type of entry, to for example- add items to inventory. My question is do I make a separate table that is used to supply the dropdown or cascading boxes with the values that are then saved to the inventory item's own table?
    Answer, sort of but it all depends what you want to populate the Inventory table with.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: Using a list box with MySQL

      I will want to be able to search the inventory for items based on the category in the end. So I would like for the category to be saved in the database and linked to items that are in each specific category. I just listed any possible ways that I had thought of it could be done.
      Jerrod Sand

      Comment


        #4
        Re: Using a list box with MySQL

        Jerrod,

        Sounds like you need a separate table for category.
        Regards
        Keith Hubert
        Alpha Guild Member
        London.
        KHDB Management Systems
        Skype = keith.hubert


        For your day-to-day Needs, you Need an Alpha Database!

        Comment


          #5
          Re: Using a list box with MySQL

          So then I would just add the itemid field to the category table as a foreign key? Correct? Meaning itemid is the primary key used for the items in my item table.
          Jerrod Sand

          Comment


            #6
            Re: Using a list box with MySQL

            Hi Jerrod,

            The way I would do it, is in your Inventory table you have a category field. This would be a lookup to the Category table. You can populate this field with the description of the category or the category_id. The main reason to capture the category_id is to use as a link to the Category table in a View.
            Regards
            Keith Hubert
            Alpha Guild Member
            London.
            KHDB Management Systems
            Skype = keith.hubert


            For your day-to-day Needs, you Need an Alpha Database!

            Comment


              #7
              Re: Using a list box with MySQL

              Hi Jerrod

              There are 2 ways to approach; both have advantages and disadvantages.
              You can take a column in a table and do "Distinct" (Get one record for every new "Distinct" word or phrase or number date) This ensures that all choices are available, but only choices that are currently in the table. (Alpha does this for you). If you build a second table you may get problems keeping Category_Id up to date. Obviously the way around this is to restrict entries to the first table based upon what is available in the category table.

              As you get more confident it is possible to update both tables at the same time.

              Really you need to decide on your table structure based upon what data you are trying to store.
              Read a simple article on database "Normalisation".

              I always spend a little time thinking how I will gather the information, what existing processes exist. I try to change as little as possible, in the existing non computerised data entry, but use the database to enforce business logic.

              Michael

              Comment


                #8
                Re: Using a list box with MySQL

                Keith, So you are suggesting using a bridge table to link the items to the category using itemid and categoryid. Which are the primary keys for each. By the way I think I Should have posted this in the web based since that is how I will run this app.
                Jerrod Sand

                Comment


                  #9
                  Re: Using a list box with MySQL

                  Hi Jerrod,

                  I thought to start with this could be web as you mentioned cascading dropdown.

                  Cascading Dropdowns are used for filtering records, not for data entry.

                  I'm not suggesting a link table. Each inventory product would be given a category, this would be got by a lookup to category table. If you just capture the Category_Id then you would need to create a View linking on that field. You could capture the text of the category into your inventory table in which case you would not need the View.

                  If you would like to call me on Skype, I might be able to help you better.

                  PS. Next time use the area of the forum that will give you the most appropriate help. (Sorry if that sounds a bit formal).
                  Regards
                  Keith Hubert
                  Alpha Guild Member
                  London.
                  KHDB Management Systems
                  Skype = keith.hubert


                  For your day-to-day Needs, you Need an Alpha Database!

                  Comment

                  Working...
                  X