Different SQL parts have different meaning. For example, a part enclosed in quotes is treated as a string literal.
Unquoted parts are more ambiguous, and can be, depending on the context, an SQL keyword, an SQL operator, an identifier (a column or a table name) or a numeric literal. Given all that, you are supposed to format query parts properly. For example, a string literal must be enclosed in quotes and have all special characters escaped.
As you failed to do so, the 'General' word is taken for a column name, as WHERE topic_name= General
is a legitimate (though quite pointless in this context) SQL statement that would look for the value stored in the General
field, would it was present in the table. Alas, there is no such field, hence the error.
The most important part, when you are building your query dynamically, you must never format any data literals manually but use prepared statements instead.
$stmt = $link->prepare("SELECT * FROM topics WHERE topic_name= ?");
$stmt->bind_param("s", $_GET['id']);
$stmt->execute();
$result = $stmt->get_result();
Beside other benefits, it will eliminate even the possibility to get such an error in the future.