PK

ADDRLIN : /proc/self/root/home/bw2hgtn172qm/www/jeffharrismusic.com/include/
FLL :
Current File : //proc/self/root/home/bw2hgtn172qm/www/jeffharrismusic.com/include/livetable.php

<?php
include("db_connect.php");


 //mysql_query(' ALTER TABLE `socc_fieldvalue` ADD `seq_no` INT( 11 ) NOT NULL AFTER `isrequired` ;');
 //--------------------------delete table===========================================
// $deletetable_values= mysql_query("TRUNCATE TABLE socc_mail");
 //--------------------------table structure ===========================================
$q = mysql_query('DESCRIBE 	jeff_banner');

while($row = mysql_fetch_array($q)) 
{
    echo "{$row['Field']} - {$row['Type']}<br>";
}
 //-------------------------- table values===========================================

$table = 'jeff_banner';

$result = mysql_query("select * from {$table}");
if (!$result) 
{
    die("Query to show fields from table failed");
}
$fields_num = mysql_num_fields($result);
echo "<h1>Table: {$table}</h1>";
echo "<table border='1'><tr>";
// printing table headers
for($i=0; $i<$fields_num; $i++)
{
    $field = mysql_fetch_field($result);
    echo "<td>{$field->name}</td>";
}
echo "</tr>\n";
// printing table rows
while($row = mysql_fetch_row($result))
{
    echo "<tr>";
    foreach($row as $cell)
        echo "<td>$cell</td>";
    echo "</tr>\n";
}
mysql_free_result($result);
?>


PK 99