WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation

If it’s no extricly neccesary perform an operation in a sql statement I would prefere perfom it over an Array of admin_op data, like : op_sum = get_results( Select fund_user FROM table WHERE type_operation = admin_op ); then var = array_sum(op_sum);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)