How to select category information from a table?

Please tell me, if there is a table where all the information is divided into, say, 2 categories, how to use $result = mysql_query(“SELECT name FROM table“) to extract only the rows of one category? The division into categories in the table takes place in a special column, where each row is assigned a category.


Answer 1, authority 100%

$result = mysql_query("SELECT `name` FROM `table` where `category`='selectedCategory'")
//selectedCategory -   

Answer 2, authority 100%

$result = mysql_query(“SELECT name FROM table where column_name=’category'”);