Jump to content

How to increment a shipping box after 36 units have been assigned to it?


texmansru47

Recommended Posts

I need the ability to package 36 units into one box... each unit will be tracked by that boxID.  For example:

 

If I have product in a table with serial numbers 1 thru 36 let's say, and they all go in one box... and that box ID is 3500... how can I:

 

1) capture that data in the table where the Product ID and the BOX ID are listed

2) only increment the box number to the next number (incremental) when the box is either:

    A) reached the limit available which is 36 units.

    B) the user can terminate the packaging BEFORE 36 if there is not enough items to go into the box?

    c) Need to have the BOX ID auto generated?

 

Honestly I have tried a one thing to no avail.

 

I have tried:

$query = "SELECT MAX(`MPBoxNum`) AS `max` FROM `Ship`";
$findings = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_assoc($findings);
$startit = $row['max'];

// I get a incremental value for each item under box ID (1, then 2, etc).

 

I could have the user insert the BOX ID when they are shipping, but that would be REAL time consuming and a real pain since they would have to know all last BOX ID or run a query to find it.

 

Any ideas?

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.