To the user traffic in proftp log to a MySQL database, you only need the user table a column “traffic” Add type BIGINT, Default 0:
ALTER TABLE `ftpuser` ADD COLUMN `traffic` BIGINT NOT NULL DEFAULT '0';
Then you can use a SQLNamedQuery kan in the sql.conf, to cut with the amount of traffic:
SQLLog RETR,STOR,APPE extendedlog SQLNamedQuery extendedlog UPDATE "traffic= (traffic + %b) WHERE userid='%u'" ftpuser
Attention, Use leads to increased traffic to the database.