1
I needed to change my mysqli connection to Pdo, and I am "picking up" at the point of which index I want to print, look at the example of the mysql model:
$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’t print it separately, 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 thank you for your attention!^^
Thanks friend, the problem has been solved.... simple thing rsrrs! Again a thank you very much!
– Marcos Marciel Pagung