There is a need to make a function to get data from the database before the main query, then to substitute values from another table.
Inventing a bicycle, something like that
function useraccess() { mysql_connect($host, $user, $pass); mysql_select_db($base); q = mysql_query("SELECT `accesslevel` FROM accounts WHERE login = " . $res['commentautor'] . ""); res = mysql_fetch_assoc($q); $accesslevel = res['accesslevel']; } I tried to call, too, in different ways ....
Climbed half the guide, queries on the "php function" show the results on simple functions, I have not found any examples of working with the database. (