keram617 Posted October 30, 2010 Share Posted October 30, 2010 Hello I am trying to find out how I could do the following. I am building a form where data is being stored in MYSQL database (a PHP website) for every customer record, however the hard part in figuring this out for me is how could I add more parts if needed to the same record or at least a record that has the same customer_id. For example, if a customer has a record created and they are purchasing more then one part from me I would like to have a field "add more parts" and this will allow me to select additional part but I want to make sure it is stored in a table as part of the same record (I dont care if it will create multiple records in the table or if it will be stored in second field). Good example would be, if you log into any of your Webmails, and when you are creating a new email with an attachment, but you have more then one attachment, there is a link or a button that says "more attachments" and when you click on it, it creates new field for you. Purpose of this is so I can then do a data scrap weekly and have it bounced against my inventory table and give me a count of left over part count. Unless someone knows of some good PHP/MYSQL prebuilds for customer records creation and inventory control. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/217275-add-more-parts-how-to-create-it-in-mysql-and-php/ Share on other sites More sharing options...
chrules Posted October 31, 2010 Share Posted October 31, 2010 Don't know how exactly, but i think what you are referring to, is using array... Store your $variable in an array, INSERT INTO mysql table, and it will loop through the INSERT for as many variables there is in the array. Hope this gives you an idea.. Quote Link to comment https://forums.phpfreaks.com/topic/217275-add-more-parts-how-to-create-it-in-mysql-and-php/#findComment-1128529 Share on other sites More sharing options...
MPeter Posted October 31, 2010 Share Posted October 31, 2010 Hello, keram617. a) Do you use a shop-software? Or is your "shop" hand-written? When you do not have the permission to change code in the software, you know. License-Thing! b) As you did describe that you want to "store stuff to a MySQL with PHP", perhaps you could perfectly start here: http://www.w3schools.com/php/php_mysql_intro.asp Regards, MPeter Quote Link to comment https://forums.phpfreaks.com/topic/217275-add-more-parts-how-to-create-it-in-mysql-and-php/#findComment-1128585 Share on other sites More sharing options...
keram617 Posted October 31, 2010 Author Share Posted October 31, 2010 MPeter Is there some good shop software for inventory control? that would work with MySQL and PHP of course. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/217275-add-more-parts-how-to-create-it-in-mysql-and-php/#findComment-1128753 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.