Show Log
");
// connect and access to MySql db
$link = mysql_connect('localhost', 'root', '');
if (!$link) die('Cannot connet to DB'.mysql_error());
$db_selected = mysql_select_db('opengatem', $link);
if (!$db_selected) die('Cannot select DB'.mysql_error());
mysql_set_charset('utf8');
$result = mysql_query('SELECT * FROM sessionview where userId like "'.$userId.'" and device like "'.$device.'" and "'.$fromTime.'"");
print('');
$count=0;
while ($field = mysql_fetch_field($result)) {
print(''.$field->name.' | ');
$count++;
}
print('
');
// show rows
while ($row = mysql_fetch_row($result)) {
print('');
for($i=0; $i<$count; $i++){
print(''.$row[$i].' | ');
}
print('
');
}
print("");
$close_flag = mysql_close($link);
?>