mysql - sql like search character -



mysql - sql like search character -

hello wanted search after 5 character

(yyyy-mm-dd) 2000-02-01 2001-01-01 2001-01-05 2001-03-03

i wanted mm value

select * day , employee employee.id = day.employee , employee = "$_id" , day.leaveday "%$month%";

the problem if utilize % % (wildcard) 20001 - 03 - 03 , 2000-02-01, show how value mm?

any ideas? in advance help, , i'm sorry if has been asked before

i'm taking leaveday date, datetime, or timestamp column. if not first create 1 since you're storing dates. prevent invalid dates such 20001 showing up. utilize mysql extract function run this

select * day , employee employee.id = day.employee , employee = "$_id" , extract(month day.leaveday)=3

mysql

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -