The result I have from the SQL query is this:
I want to return these two rows from column 'publication'. But using this code:
<?php
//Código para buscar os tweets do usuário
$sqlTweets = "SELECT publicacao FROM tweets INNER JOIN usuarios ON usuarios.id_usuario = tweets.id_usuario WHERE apelido_usuario = '{$usuario}' OR email = '{$usuario}'";
$buscaTweets = mysqli_query( $link, $sqlTweets );
if ( $buscaTweets ) {
$tweets = mysqli_fetch_row( $buscaTweets );
}
?>
An error is returned when I try to access index 1 of '$ tweets', the error is this: 'Undefined offset: 1 in'. Or is it just returning the first line of the query and I want it to be returned all, how do I?