The select
was working normally in wamp, however when uploading the site to the server the information on some pages simply stopped coming.
The only part where select
is working is the login area of the administrative area, I have already checked my connection file and all the information hits the server, in select
it.
Follow the code for one of the pages:
include 'conexao.php';
// Selecionando informações da tabela galeriafotos
$sql = "SELECT * FROM 'galeriafotos' order by datacadastro DESC";
//Selecionando informações da tabela projetos
$sql2 = "SELECT * FROM 'projetos' order by datacadastro DESC";
$resultado = mysqli_query($conexao, $sql);
$resultado2 = mysqli_query($conexao, $sql2);
And I call them on the page through the following code:
<?php foreach($resultado as $linha) { ?>
<tr>
<td>
<?php echo $linha["titulo"]; ?>
</td>
<td>
<?php echo date('d/m/Y', strtotime($linha['datacadastro'])); ?>
</td>
<td>
<?php echo $linha["categoria"]; ?>
</td>
<?php } ?>