[Solved] Is my code being inputed correctly? [closed]


Try this…

$conn = mysql_connect(db_server, db_user, db_pass);
if ($conn !== false) {
    mysql_select_db(db_name);
    $result = mysql_query("SELECT *, COUNT(track.usr_id) AS usr_views FROM user, track WHERE track.usr_id =     $usr_id AND track.timesin = $les_tag GROUP BY $usr_id ORDER BY usr_views LIMIT 1");      
    if ($result !== false && mysql_num_rows($result) > 0) {
        $usercheck = mysql_fetch_row($result); 
        $Userstats = $usercheck;
    }
} else {
     die("There was an error while connecting to the mysql server");
}

solved Is my code being inputed correctly? [closed]