SQL command to export post_content from wp_posts using phpMyAdmin

Use This Script

<?php
$servername = "localhost";
$username   = YOUR_USER;
$password   = YOUR_PASSWORD;
$dbname     = YOUR_DB_NAME;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$a1 = ($_GET['id']); 
$sql = "SELECT post_content FROM `wp_posts` where ID='$a1'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo $row["post_content"];
    }
} else {
    echo "0 results";
}
$conn->close();
?>

Don’t Forget To Change Your Database Details Above

tech