Answer the question
In order to leave comments, you need to log in
How to get username by id from mysql database?
I'm trying to get the username by id, but as a result I get an Array instead of a name
$user_name = $db->super_query( "SELECT name FROM " . USERPREFIX . "_users WHERE user_id=3 " );
$user_name = $user_name['name'];
Answer the question
In order to leave comments, you need to log in
$user_name_super_query = $db->super_query( "SELECT name FROM " . USERPREFIX . "_users WHERE user_id=3 " );
$user_name = $user_name_super_query['name'];
echo $user_name; // Тут будет Имя
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question