You can do SELECT
by selecting only the date and name fields:
SELECT nome,data FROM sua_tabela
And you can also select all the columns of the table
SELECT * FROM sua_tabela
If you want to select these same columns from all the tables that you have in the database and display all the results at once, try the following:
PDO
$query = $bd->query("SHOW TABLES");
while ($result = $query->fetch(PDO::FETCH_NUM)){
$tabela = $result[0];
$sql = "SELECT nome, data FROM ".$tabela;
if ($rs = $bd->query($sql)) {
while ($row = $rs->fetch_assoc()) {
echo $row['data'];
echo $row['nome'];
}
}
echo '<hr>';//Separa o resultado de cada coluna selecionada
}
MySQLi
$query = mysqli_query($this->conn, "SHOW TABLES");
while($result = mysqli_fetch_array($query)){
$tabela = $result[0];
$sql = mysqli_query("SELECT nome,data FROM ".$tabela);
while($row = mysqli_fetch_array($sql)){
echo $row['data'];
echo $row['nome'];
}
}