Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

check the product change in mysql

Posted on 2006-11-15
2
Medium Priority
?
164 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 1350 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

610 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