Has MySQL got check constraints yet? If so, you could use one of those and check for an insert error:
db=# create table test (date1 date, date2 date, constraint "dates out of order" check (date1<date2));
CREATE TABLE
db=# insert into test values ('2001-01-01','2001-01-02');
INSERT 645328 1
db=# insert into test values ('2001-01-03','2001-01-02');
ERROR: new row for relation "test" violates check constraint "dates out of order"
db=# select * from test;
date1 | date2
------------+------------
2001-01-01 | 2001-01-02
(1 row)
The advantage here is that no matter how many mistakes you make in your code or how the user tries to hack around your js checking, you can't get the wrong data in the database because the database won't let you.
Note that you could create a simple query too to check it, before storing it:
db=# select cast('2001-01-03' as date) < cast('2001-01-02' as date);
?column?
----------
f
(1 row)
db=# select cast('2001-01-01' as date) < cast('2001-01-02' as date);
?column?
----------
t
(1 row)