# Search the needed table and pull out needed columns my $search = "SELECT comment_ID,comment_content FROM wp_comments" my $sql = $db->prepare($search); $sql->execute(); # Input fetched data into an array my @retrievedData = ""; while (my @row = $sql->fetchrow_array()) { push @retrievedData, [@row]; }