Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6881907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:11:18+00:00 2026-05-27T05:11:18+00:00

I am trying to make an inventory system for a company, when user will

  • 0

I am trying to make an inventory system for a company, when user will enter item to an inventory there is no problem as the table is shown below, however how do i know how many item left when some of the item is sold ? for example I purchased 100 bags and Mr Y purchased 20 bags, how will system show 80 bags left ? Any help would be appreceated. Thanks

CREATE TABLE `inventory` (
 `inv_id` int(11) NOT NULL AUTO_INCREMENT,
 `inv_reference_no` varchar(40) NOT NULL,
 `inv_part_no` varchar(100) NOT NULL,
 `inv_category_id` int(11) NOT NULL,
 `inv_product_name` varchar(200) NOT NULL,
 `inv_quantity` int(11) NOT NULL,
 `inv_description` varchar(500) NOT NULL,
 `inv_cost_price` float(12,2) NOT NULL,
 `inv_cost_sub_total` float(14,2) NOT NULL,
 `inv_product_type` enum('cons','serv','stock') NOT NULL,
 `inv_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`inv_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:11:18+00:00Added an answer on May 27, 2026 at 5:11 am

    You can add field say “in_stock” in you table which will store the quantity of products left.
    Or you can decrement your quantity field everytime any item is purchased.
    Hope it helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to make a drag and drop system for a game type inventory,
I'm trying to make a list of inventory to be counted, provided the item
I am pretty new to PHP and I am trying to make an inventory
trying to make a page which will recursively call a function until a limit
I am trying to use regular expressions to make my inventory upload script a
I'm trying make a static text which if too long for the sizer, will
Trying to make my own contact form with php. Is there a better/cleaner way
Im trying to make a gallery piece for my website. I know there are
I'm trying to build an inventory system for the various servers and apps we
I'm trying to make a loop in php that will go through a MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.