Solved

check the product change in mysql

Posted on 2006-11-15
2
151 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

732 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