Answer the question
In order to leave comments, you need to log in
How to make a selection in the select list from the database?
There is a regular list, and you need to display values from the database into it, i.e., the list will change depending on what I write in the selection parameters, like: select from the table ... value ...
Answer the question
In order to leave comments, you need to log in
Not quite sure, do you need something like this?
$connection = new \PDO($params);
$statement = $connection->prepare(
"SELECT field1,field2,fieldN FROM tableName WHERE field2 = :param1 AND field1 = :param2"
);
$statement->bindValue("param1", "blblabla", \PDO::PARAM_STR);
$statement->bindValue("param2", 100500, \PDO::PARAM_INT);
$statement->execute();
$list = $statement->fetchAll(\PDO::FETCH_ASSOC);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question