You should have only one WHERE
clause. AND
operator is enough to separate the two conditions.
SELECT *
FROM admin_nav1
WHERE Active = 'YES' AND LinkedID = '$WID' // <<== one WHERE clause
ORDER by OrderSet ASC
One more thing, your query will not ORDER
the rows correctly because you have wrap the column name OrderSet
with single quotes thus converting it into a string. When you are concern of the column names if they are a reserved keyword or not, you can either wrap it with a backtick or supply an alias on the table and use the column names with that alias to delimit the column but not with single quotes.
As a sidenote, the query is vulnerable with SQL Injection
if the value(s) of the variables came from the outside. Please take a look at the article below to learn how to prevent from it. By using PreparedStatements
you can get rid of using single quotes around values.