Support » Everything else WordPress » Wondering about the Database

  • If an entry / comment is deleted, am I right in thinking that it isn’t actually deleted from the db, but simply marked in a way that the program ignores that data.
    Not that I want to do it (I’m just interested!), but is there a way – if what I said was correct – of reclaiming the space within the db that is taken by such data. Or would that completely screw things up given the inter-relating links ?
    A sort of db-defragging 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • this technique of tagging posts to not delete them is not the one used here… look:
    $wpdb->query(“DELETE FROM $tablecomments WHERE comment_ID = $comment”);
    this is the db entry done when deleting a comment in the admin cp… so it’s deleting the entry, completely… the only thing is that there is no optimisation of the tables in the process, but that may be added someday.

    Thanks .. that’s my curiosity sated for a few hours 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wondering about the Database’ is closed to new replies.