Welcome Guest, Not a member yet? Register   Sign In
need to find all records with 2009 from a date string of XX/XX/XXXX
#5

[eluser]renownedmedia[/eluser]
Regex is very slow, don't use it for database queries. The quick fix would be a LIKE '%2009' but the best method would be to convert the database column from a VARCHAR(10) to a DATETIME field and to use a mysql query based on an EXTRACT YEAR or something.

http://dev.mysql.com/doc/refman/5.1/en/d...tions.html


Messages In This Thread
need to find all records with 2009 from a date string of XX/XX/XXXX - by El Forum - 08-14-2009, 01:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB