Sto tentando di fare una procedura simile a questa (per mysql):
- Codice: Seleziona tutto
<?php
$query="SELECT * FROM tabella LIMIT 3";
stampa_query($query);
function stampa_query($query)
{
$result= mysql_query($query);
$numfields = mysql_num_fields($result);
echo "<table>\n<tr>";
for ($i=0; $i < $numfields; $i++)
{
echo '<th>'.mysql_field_name($result, $i).'</th>';
}
echo "</tr>\n";
while ($row = mysql_fetch_row($result))
{
echo '<tr><td>'.implode($row,'</td><td>')."</td></tr>\n";
}
echo "</table>\n";
}
?>
Ma per sqlite3...
Non trovo il nome dei campi che vengono richiesti nella query
Aiuti???

