If $id contains "Shooter" as a string value it need to be in quotes otherwise SQL thinks it is a column name
$sql = "SELECT * FROM games WHERE genre = '$id' ";
^ ^
An optional parameter would be like
public static function render($post, $withPost = true) {
which will default to true if not provided. You would then use $withPost to decide whether to do that ->push or not.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.