我混合了sql和sqli命令..但这会给出错误..正确的代码是什么? [重复]

This question already has an answer here:

There's some error in this piece of code..can someone care to correct me?

$user_list=mysqli_query("SELECT 'id','username', FROM 'users' ");
    while($run_user=mysqli_fetch_array($user_list)){
        $user=$run_user['id'];
        $username=$run_user['username'];
        echo "<p><a href='send.php?user=$user'>$username</a></p>";
        }

From comments made below -

mysqli_query() expects at least 2 parameters, 1 given in D:\wamp\www\2\send.php on line 44

</div>

Just replace quotes with backtick also mysqli_query need connection in your first parameter

 $user_list=mysqli_query(PASS_YOUR_CONNECTION_VARIABLE,"SELECT `id`,`username` FROM `users`");

Ummm, see your SELECT query once, it's full of errors like below

  1. don't quote column names and table names else DB engine will think it as string literal rather a column.

  2. there is a extra , before FROM clause in your query.

Correct one should be

SELECT `id`,`username` FROM `users`