Solved

check the product change in mysql

Posted on 2006-11-15
2
146 Views
Last Modified: 2008-02-20

00001  0   2006-11-15 20:54:05
00002  2   2006-11-15 20:54:05
00012  4   2006-11-15 20:54:05
00001  4   2006-12-15 20:54:05
00002  3   2006-12-15 20:54:05
00003  2   2006-12-15 20:54:05

three colum above name code,onhand,time

how can I write code to caculate onhand  change  (if some code nohave onhand give it equal to 0)
00003  2
00002  1
00001  4
00012  -4   (if some code nohave onhand give it equal to 0)
0
Comment
Question by:teera
2 Comments
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 450 total points
ID: 17949219
I'm not even sure what you're asking.  It seems like you want the difference between 'onhand' found on two different dates, yet the example you gave there doesn't seem to reflect that?

If that is what you want, which two dates?  How many dates are listed for each item?  Do you want the difference between each pair, or just the difference from the earliest record to the most recent?
0
 

Author Comment

by:teera
ID: 17951930
Hi  VoteyDisciple
you are right that is the think I want can I use sql command only or I need to use php
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now