Meap
Don't need glasses if you C#
Ive almost fixed my chatlogs to work with the azure structure but I'm stuck on this last bit for searching for the username, because in the azure chatlogs structure, it enters the user id and I cant think how to make it pull the username in this line of code,
any ideas? If more is needed I can post the whole chatlogs file I have for the HK?
Code:
<?php
$searchResults = null;
if (isset($_GET['timeSearch']))
{
$_POST['searchQuery'] = $_GET['timeSearch'];
$_POST['searchType'] = '4';
}
if (isset($_POST['searchQuery']))
{
$query = filter($_POST['searchQuery']);
$type = $_POST['searchType'];
$q = "SELECT * FROM users_chatlogs WHERE ";
switch ($type)
{
default:
case '1':
$q .= "user_id = '" . $query . "'";
break;
case '2':
$q .= "message LIKE '%" . $query . "%'";
break;
case '3':
$q .= "room_id = '" . $query . "'";
break;
case '4':
$cutMin = intval($query) - 300;
$cutMax = intval($query) + 300;
$q .= "timestamp >= " . $cutMin . " AND timestamp <= " . $cutMax;
}
$searchResults = mysql_query($q);
}
?>