I've this two query that i want combine. I already done some proof without success, evidently i go in error ordering the words in the right mode
$qryString="INSERT INTO votation (userID, voto, messageID) VALUES (:user, :voto, :mID)
ON DUPLICATE KEY UPDATE voto = :voto";
$qryString="SELECT AVG(voto) AS average_valutation FROM votation WHERE messageID=:mID";
Hove to unify this two queries in one?