So Ive got a couple of statements using a list of variables and it seems i am always adding another column to the database so i wanted to make one list of variables and contain it somehow so i can just change it once if i need to instead of half a dozen times.
$stmt = $mysql->prepare("SELECT * FROM table WHERE id =? LIMIT 1");
$stmt -> bind_param('i', $id);
$stmt->execute();
$stmt->bind_result($a, $b, $c, $d, $e, $f, $g);
$stmt->fetch();
$stmt->close();
But I want to make something like this:
varList="$a, $b, $c, $d, $e, $f, $g";
$stmt = $mysql->prepare("SELECT * FROM table WHERE id =? LIMIT 1");
$stmt -> bind_param('i', $id);
$stmt->execute();
$stmt->bind_result($varList);
$stmt->fetch();
$stmt->close();