function sphinx_search($query) {
$conn = new mysqli('127.0.0.1', '', '', '', 9306);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT id,title,content FROM prezumciya_index WHERE MATCH('$query') LIMIT 1000";
$result = $conn->query($sql);
if ($result && $result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
print_r($row);
}
} else {
echo "No results found.";
}
$conn->close();
}
sphinx_search('реферат');
If(strtotime($date1)<strtotime($date2)){
...
}