// Whas that update fine?
if (SQL_AFFECTEDROWS() == 1) {
// Load referal's data
$result = SQL_QUERY_ESC("SELECT id, gender, surname, family, email,
(points_amount - points_used) AS points, receive_warnings, ref_count AS refs
// Whas that update fine?
if (SQL_AFFECTEDROWS() == 1) {
// Load referal's data
$result = SQL_QUERY_ESC("SELECT id, gender, surname, family, email,
(points_amount - points_used) AS points, receive_warnings, ref_count AS refs