Solved

check the product change in mysql

Posted on 2006-11-15
2
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

691 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