Re: Date_format -> can't get it..

2001-04-10 Thread David Bouw
Hi Peter, The collumn is a datatime... You are tight that date probably should be is a reserved word.. I must say that I never had any troubles with it, I started using it when I was a newbie with PHP about a year ago... On almost all my tables I always have an auto-increment column with the name

Re: Date_format -> can't get it..

2001-04-10 Thread Peter Pentchev
First off, I don't think you should use 'date' as a column name; isn't it a reserved word? Then, hmm.. is that column a DATE column, or DATETIME, or TIMESTAMP? If it is DATETIME or TIMESTAMP, then you don't really need the DATE_FORMAT() conversion; compaing a DATETIME or TIMESTAMP value directly

Date_format -> can't get it..

2001-04-10 Thread David Bouw
Hi there, I don't seem to understand the DATE_SUB / INTERVAL function.. I have a query which basically retrieves data from a table which consists of ordernumers and quantities.. In the following example everything of ordernr 'te-004' should be retrieved, quantities counted and this should be don