Update mysql ( small fix pls )
-
function reward(){ $current_user = wp_get_current_user(); $grade = $current_user->points - 1; $sql = "UPDATE wp_users SET points = '$grade' WHERE ID = '$current_user->ID' "; $res = mysql_query($sql); } add_action('added_postmeta','reward');
what is wrong here?
Please help I’m having a headache lol.Thx
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Update mysql ( small fix pls )’ is closed to new replies.