logotype

Connexion

Description d'une table et récupération des clés primaires

$sql = "DESCRIBE ".$_POST['table'];
$db->fetch($sql);
print "<tr bgcolor='#E6E6E6' align='center'>";
while ($db->hasnext())
{
    $tuple = $db->next();
    if ($tuple['Key'] == "PRI")
    {
        $primaryKey[$j] = $tuple['Field'];
        $j++;
    }
    print "<th>".$tuple['Field']."</th>";
    $listField[$i] = $tuple['Field'];
    $i++;
}

You have no rights to post comments