EDIT Provided as requested is here how the Date column looks: Jan 15, 2014 Jan 16, 2014 Aug 10, 2014
So what i am trying to achieve, is extract every row that contains Jan 2014, so i get every row for that month in that year.
Here is my PHP code that generates the query:
$monthYearString = $month . "%" . $year;
$query_current = "SELECT * FROM {$table_omsaetning} WHERE 'Date' LIKE " . "'{$monthYearString}'";
echo $query_current;
The echo gives me this query: SELECT * FROM table_name_here WHERE 'Date' LIKE 'Jan%2014'
Original question
I have a very weird issue here. If i perform a search using phpAdmin provided by my hosting site, and search for rows that are like a certain date, it conjures up this SQL statement, and it finds 3 rows:
SELECT *
FROM `table_name`
WHERE `Date` LIKE 'Jan%2014'
BUT, when I try to do the same thing either using SQL statements in phpAdmin or my own code, it shows NOTHING? How come? It is 100% the same statement. Really can't understand how I can search using the built-in phpAdmin function, and then it generates that SQL statement, and then when I try to inject it myself, it just returns 0 rows instead of 3.
Hope it makes sense.