I need to change my mysqli connection to pdo, and I'm "catching up" when pointing to the index I want to print, look at the example of the model with mysql:
$Busca = mysql_query("SELECT * FROM OrdemServico WHERE Status = '$Status'", $con -> conexaoMysqlP()) or die (mysql_error());
$Consulta = mysql_fetch_array($Busca);
<?php
do{
<table>
<tr>
<td width="50px"><span class="RAT"><?=$Consulta["RAT"] ?></span></td>
<td width="150px"><?=$Consulta["Clientes"]?></td>
<tr/><table>
}while ($Consulta = mysql_fetch_assoc($Busca));
Now I need it in PDO, but I can not print separate, just all and with the index.
$Pesquisar = $pdo->prepare("SELECT * FROM OrdemServico order by Status");
$Pesquisar -> execute();
$result = $Pesquisar->fetchAll();
<table>
<tr>
<td width="50px"><?=$Consulta["RAT"] ?></td>
<td width="150px"><?=$Consulta["Clientes"]?></td>
<tr/><table>
}while ($result = $Pesquisar->fetchAll());
I hope someone can help me, and thanks for the attention! ^^