bsp; return $result;
}
function addTable ($database, $table)
{
$result = "";
msql_connect ( "localhost");
$msqlresult = msql ($database, "SELECT * FROM " . $table);
$fieldsNumber = msql_numfields ($msqlresult);
$msqlresult = msql_listfields ($database, $table);
$fieldIndex = 0;
while ($fieldIndex < $fieldsNumber)
{
$fieldNames [$fieldIndex] = msql_fieldname ($msqlresult, $fieldIndex);
$fieldLengths [$fieldIndex] = msql_fieldlen ($msqlresult, $fieldIndex);
$fieldTypes [$fieldIndex] = msql_fieldtype ($msqlresult, $fieldIndex);
$fieldIndex++;
}
handleAdd ($database, $table, $fieldsNumber, $fieldNames, $fieldLengths, $fieldTypes);
$result .= displayAdd ($fieldsNumber, $fieldNames, $fieldLengths);
return $result;
}
?>
}
function addTable ($database, $table)
{
$result = "";
msql_connect ( "localhost");
$msqlresult = msql ($database, "SELECT * FROM " . $table);
$fieldsNumber = msql_numfields ($msqlresult);
$msqlresult = msql_listfields ($database, $table);
$fieldIndex = 0;
while ($fieldIndex < $fieldsNumber)
{
$fieldNames [$fieldIndex] = msql_fieldname ($msqlresult, $fieldIndex);
$fieldLengths [$fieldIndex] = msql_fieldlen ($msqlresult, $fieldIndex);
$fieldTypes [$fieldIndex] = msql_fieldtype ($msqlresult, $fieldIndex);
$fieldIndex++;
}
handleAdd ($database, $table, $fieldsNumber, $fieldNames, $fieldLengths, $fieldTypes);
$result .= displayAdd ($fieldsNumber, $fieldNames, $fieldLengths);
return $result;
}
?>