I currently have a date that's being stored in my SQL database as a VARCHAR of 255 characters. I declared this string as
//within an object...
$date = date(DATE_RFC822);
Now, later on in the coding, I realise that I need to actually compare dates with each other. My initial, very naive attempt looked a little bit like this:
if(object_1->date > object_2->date){
//do this that assumes that object_1 was created at a later date than object_2
}else{
continue;
}
While this worked fine for different times of the same day; using the code a week later began to show significant bugs.