Firstly : surely your date column is of type date or datetime ???
Secondly : if it's not a date and is instead a string then have you enabled fulltext searching on it?
The column is of the type date and I have made a fulltext index of the column together with some other columns.
Hmm.. if I can't do a fulltext search, can I do like this? (for example)
Code:
if (preg_match("/^\"?(\d{2})-(\d{2})-(\d{4})\"?$/",$fritext)) {
$search = explode("-", $fritext);
$search = "`".$search[2]."-".$search[1]."-".$search[0]."`";
$sql = "SELECT * FROM `private` WHERE date = $search order by id DESC";
$result = mysql_query($sql) or die("SQL: $sql <br>".mysql_error());
}
else {
$search = $fritext;
$sql = "SELECT * FROM `private` WHERE MATCH (name, date, words) AGAINST ('$search' IN BOOLEAN MODE) order by id DESC";
$result = mysql_query($sql) or die("SQL: $sql <br>".mysql_error());
}
Thanks in advance!