如何显示mysql字段名的所有行数据

I am trying to display all the data of mysql field but having issue display it. What I want to do is display all the first name and last name of the members which has a membership level of 1 so if there are 20 users with membership level 1, it would display 20 first name

$query = "SELECT first_name, last_name FROM " . $wpdb->prefix . "ss_table WHERE membership_level = 1";
echo $query[20];

You've written a query, but you need to execute it if you want to get results. Echoing $query[20] will just give you the 20th character of your query statement. Look into some docs: http://php.net/manual/en/book.mysqli.php or tutorials on how to connect to a database.

Your sql query is wrong, you should first check out sql sites for writing query
For fetching a single column from a table you have to use

select first_name from ss_table

but for fetching more than one column you have to append "," after every column name except after the last column

select first_name, last_name from ss_table