Ok say i have 1 table for Users it stores USER_NAME, USER_ID, AND USER_COLOR and im making a new table for Logs that will store USER_NAME
when viewing a page and i need to recieve this data i can do 2 querys one for logs and then search users where USER_NAME=USER_NAME
or i can store USER_NAME, USER_ID, AND USER_COLOR all in logs then i can get all the data with just 1 query.
what would be faster or better?
sample query
$sql = "SELECT id, username, level, namecolor FROM users ORDER BY level DESC";
$query = mysql_query($sql) or die(mysql_error());
$count = mysql_num_rows($query);
while($row = mysql_fetch_object($query)) {
$Member_id = htmlspecialchars($row->id);