WordPress.org

Forums

Delete user using wordpress query (1 post)

  1. Vaib
    Member
    Posted 1 year ago #

    Hi i create a custom template and run a query to understand how to execute query in wordpress. I run this query
    <?php
    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.

Topic Closed

This topic has been closed to new replies.

About this Topic