hello to all
i have a field called birthdate, and it contains like this
1980-01-04
1981-03-15
1982-05-10
1990-02-16
1988-04-30
1985-07-05
it means, year-month-day
now, i want to sort it into day…
any idea? tnx…
hello to all
i have a field called birthdate, and it contains like this
1980-01-04
1981-03-15
1982-05-10
1990-02-16
1988-04-30
1985-07-05
it means, year-month-day
now, i want to sort it into day…
any idea? tnx…
got iy guys hehehehe
SELECT year(b_date), month(b_date), day(b_date) FROM tblemployees order by day(b_date)
can any one fix this code?
SELECT a. * , b. * , year( a.b_date ) , month( a.b_date ) , day( a.b_date ) b.designation position
FROM tblemployees a
LEFT JOIN designation b ON a.designation = b.ndex
WHERE a.empexprd = '' && a.lname <> ''
AND b_date LIKE '%-01-%' && ( tayp = 'DMI' || tayp = 'DECO' || tayp = 'SSC' || tayp = 'COOP' || tayp = 'CTG' || tayp = 'DMICITI' || tayp = 'CTMAIN' || tayp = 'CTBAC' )
ORDER BY day( a.b_date ) ASC
LIMIT 0 , 30
the error is:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘. designation position FROM tblemployees a LEFT JOIN designation b ON a . design’ at line 1
comma missing between ‘day( a.b_date )’ and ‘b.designation’
got it, thank you very much