$sql = "UPDATE
{$wpdb->prefix}{$this->prefix}prediction
SET
points = 10
WHERE
points > 10 AND
match_id = %d";
$wpdb->query($wpdb->prepare($sql, $match_id));
Where “10” is the max number of points to be gained.
Dear Landoweb,
Knowing PHP, that’s around where the problem starts. I already found the class & function. But I’m struggeling to understand how it works.
I thought to put the “bonus_goals” sql code inside of the “win” if clause. But it seems like even when a score is “exact” it still gets inside the “win” if clause…
I do hope you find some time to help me :-).
Regards!
T