i have some data at DB like:
qty item id date
0001-0500 abcd 1 2010-06-22
0001-0500 abcd 2 2010-06-22
0001-0500 abcd 3 2010-06-22
i want some script can make them order by date and show result :
qty : 500 (it means 500-1=500,number 1 read 1-1 = 0)
item : abcd
id : 3 (counting from 1 until 3)
date :2010-06-22
qty item id date
500 abcd 3 2010-06-22
i have tried like this:
'SELECT qty, item, COUNT(*) FROM inspec GROUP BY date';
before use the code above,i still confuse to make changes at :
qty
0001-0500
0001-0500 =>result become:qty : 500 (it means 500-1=500,number 1 read 1-1 = 0)
0001-0500