Im in a situation where a mysqli query is created dynamically from $_GET values, which are always changing depending on the custom searches made . Would it be possible to pass a correctly formatted (and dynamically created) string to show the different variables in question.
Example: $variabletypelist = "sss"; $variablestring = "$dogs, $cats, $weasels";
$stmt->bind_param($variabletypelist, $variablestring);
So that the end result would look similar to
stmt->bind_param($variabletypelist,$dogs, $cats, $weasels)
I realise there is this a problem since $variablestring is being taken as the variable to be bound to instead of binding to $dogs, $cats, $weasels.
Is there any simple way to do this with a string for the variables?