Support » Themes and Templates » Delete user using wordpress query

  • Hi i create a custom template and run a query to understand how to execute query in wordpress. I run this query
    global $wpdb;
    echo $sql = $wpdb->prepare(“DELETE FROM wpdb->users WHERE ID = 5”, $id) ;
    $wpdb->query($sql); ?>

    But it’s not working. how can we run wordpress query.

  • The topic ‘Delete user using wordpress query’ is closed to new replies.