April 20th, 2017, 08:26 AM
Always when running this query i get SQL error: 1305 (FUNCTION database.binomial_ci does not exist)
It used to work in the past but since i updated everything on the server it goes weird every time.
INSERT INTO votes (GroupID, Ups, Total, Score)
SELECT $NewGroupID, UpVotes, TotalVotes, VoteScore
IFNULL(SUM(IF(Type = 'Up', 1, 0)), 0) As UpVotes,
COUNT(1) AS TotalVotes,
binomial_ci(IFNULL(SUM(IF(Type = 'Up', 1, 0)), 0), COUNT(1)) AS VoteScore
WHERE GroupID = $NewGroupID
GROUP BY GroupID
) AS a
ON DUPLICATE KEY UPDATE
Ups = a.UpVotes,
Total = a.TotalVotes,
Score = a.VoteScore;
Server type: MySQL
Server version: 5.5.54-0+deb8u1 - (Debian)
Protocol version: 10
April 20th, 2017, 08:39 AM
As the error message pretty clearly states, there is no "binomial_ci" function. Is it something you made? Did you forget to recreate that function when you updated?
April 20th, 2017, 12:36 PM
Hmm, i always tought that the binomial_ci is from the tables charset type..hmm found the functioon..yeah it wasnt placed at all.