need to find all records with 2009 from a date string of XX/XX/XXXX |
[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 |
Welcome Guest, Not a member yet? Register Sign In |