madmaninamini Posted April 2, 2009 Share Posted April 2, 2009 right, i am quite new to php and mysql and have a bit of a sticking point. i am trying to edit the values in a table, but it just inst as simple as that. basically i have 3 tables in my db. customer, kit, and customerKit. what happens is a customer walks in and request to borrow some kit. this then creates a new entry in the customerKit table with there ID the kit and the quantity. they may then walk in the next day, and request 2 more of the item he got the day before, and 3 of a different item. (i should also mention that the kit manager may at any point add kit to the stores, and thus the kit table) what i have so far is a page where i select the customer, (works fine) then it navigates to a page that shows me all the items he has already with the quantity's in text boxes. what i need is a way of transferring the edits in the textbox quantity's to the customerKit table in the mysql db in so doing changing the old quantity in the db to the new quantity entered. i would also like on this page a way of adding more items of kit to that customer record that he has none of currently. so just to clarify, i need a page where i can edit the quantity of kit a customer has, and also add more kit to that customer. the kit list is constantly changing (meaning the list cant be hard coded in the page) is this at all possible???? i have been trying for about a couple of days and don't seem to be getting anywhere! thanks very much in advance for any contributions!!!! i am eternally grateful!!! any more details, just ask! (apologies for the shocking spelling!) Link to comment https://forums.phpfreaks.com/topic/152218-php-help-changeing-values-in-a-mysql-db-form-php/ Share on other sites More sharing options...
Showcase Posted April 2, 2009 Share Posted April 2, 2009 I guess you're asking for mysql help. UPDATE table_name SET kit_quantities='3,5', kits='1,2' WHERE id=2 SET is for changing feilds, multiple feilds are separated by commas. WHERE is for matching a feild to editing it's row. Link to comment https://forums.phpfreaks.com/topic/152218-php-help-changeing-values-in-a-mysql-db-form-php/#findComment-799552 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.