Originally Posted by Thuita Maina
What's wrong with this php statement?
$sql="SELECT Title, Post, Date FROM entries WHERE Title LIKE '%" . $name . "%' OR Post LIKE '%" . $name ."%' OR Date LIKE '%" . $name ."%'LIMIT $startResults, $resultsPerPage";
Date is a reserved word or, at least, not recommended as an identifier in most database systems. Surround it with back-ticks ` or square brackets, depending on which database you are using.
If Date is stored as some kind of date-value, rather than a string, then probably the format for it needs some work.