Hi,
PHP Code:
CREATE TABLE IF NOT EXISTS ingredient(
    
id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
    
food_id TINYINT UNSIGNED NOT NULL,
    
title VARCHAR(255NOT NULL,
    
point TINYINT UNSIGNED NOT NULL,
    
score INT UNSIGNED DEFAULT 0,
    
PRIMARY KEY (id),
    
UNIQUE KEY unique_ingredient_title (title)
ENGINE=InnoDB DEFAULT CHARSET=utf8
so with this query I got the ingredient with the
max score

PHP Code:
SELECT id,food_id,title,MAX(score)
FROM ubi_ingredient 
GROUP BY food_id 
but if there is a ingredient
with the same score I want the one with
the max score and I don' find the way ^^

Can you help me, please ?
Thanks in advance.