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

[eluser]Chad Fulton[/eluser]
You could also do this, since it seems like you know for sure that the format will always be the same:

Code:
$query = $this->db->query("SELECT * FROM orders WHERE status = 'complete' AND SUBSTRING(date_ordered, -4) = '2009' ORDER BY order_id ASC ");


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, 02:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB