how to compare year using sql? |
how to compare year using sql? |
rrn |
May 10 2009, 08:16 AM
Post
#1
|
Novice Group: Members Posts: 21 Joined: 15-April 09 Member No.: 8,330 |
Hi all ,
in my database there are rows of date in the form dd-mm-yyyy wat i want to do is? i want to leave a space after different years..ie if the table is 22-09-2004 06-06-2004 25-12-2005 03-02-2005 17-02-2008 it should be like this 22-09-2004 06-06-2004 25-12-2005 03-02-2005 17-02-2008 how will i compare the years using php code?? |
Brian Chandler |
May 10 2009, 08:29 AM
Post
#2
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
Hi all , in my database there are rows of date in the form dd-mm-yyyy wat i want to do is? i want to leave a space after different years..ie if the table is 22-09-2004 06-06-2004 25-12-2005 03-02-2005 17-02-2008 it should be like this 22-09-2004 06-06-2004 25-12-2005 03-02-2005 17-02-2008 how will i compare the years using php code?? You asked this before. The answer is the same. Where is the script you have at present? (Quoting me...) In this script that I can't see, there must be some kind of loop. Have a variable with the year from the previous record; compare with the year from the current record; if different, the year has "changed". If you have written the loop to do this, it is beyond me to understand how you can't see how to do this. |
Lo-Fi Version | Time is now: 29th March 2024 - 11:03 AM |