CJLeah Posted June 12, 2006 Share Posted June 12, 2006 <?php $sql_logs = mysql_query("SELECT * FROM logs ORDER by id DESC LIMIT 0, 25"); $logs_data = mysql_fetch_assoc($sql_logs);do {echo($logs_data['userid,username,hostname,time,type,message']);} while ($logs_data = mysql_fetch_assoc($sql_logs)); ?>hello the above code, is what i'm trying to use to show all log's in the database, it shows NO log information, just leave's it blank. Please HELP guys, thank you.Chris Leah Link to comment https://forums.phpfreaks.com/topic/11791-database-logs/ Share on other sites More sharing options...
wildteen88 Posted June 12, 2006 Share Posted June 12, 2006 Okay this code here is completly wrong:[code]echo($logs_data['userid,username,hostname,time,type,message']);[/code]it should be this:[code]echo $logs_date['userid'] . "<br />\n" . $logs_date['username'] . "<br />\n";echo $logs_date['hostname'] . "<br />\n" . $logs_date['time'] . "<br />\n";echo $logs_date['type'] . "<br />\n" . $logs_date['message'];[/code] Link to comment https://forums.phpfreaks.com/topic/11791-database-logs/#findComment-44667 Share on other sites More sharing options...
CJLeah Posted June 12, 2006 Author Share Posted June 12, 2006 My mistake, you put date instead of data, works now. thank you Link to comment https://forums.phpfreaks.com/topic/11791-database-logs/#findComment-44671 Share on other sites More sharing options...
ober Posted June 12, 2006 Share Posted June 12, 2006 FYI, I've edited the title... try to keep the 4-letter words out of the titles... I don't care so much about the content of the thread itself, but we don't need the younger crowd seeing that on the index.And please be more descriptive with your titles in the future. Link to comment https://forums.phpfreaks.com/topic/11791-database-logs/#findComment-44692 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.