optimize query: get al votes from user's item
- by Toni Michel Caubet
hi there! i did it my way because i'm very bad getting results from two tables...
Basically, first i get all the id items that correspond to the user, and then i calculate the ratings of each item.
But, there is two different types of object item, so i do this 2 times: show you:
function votos_usuario($id){
$previa = "SELECT id FROM…