Hello all,
Im new to PHP programming, and im having a little problem in my script:
I want to assign the columns' names to a variables
$sql = "SHOW COLUMNS FROM $table_name";
$sql_result = mysql_query($sql) or die...
while ($cols = mysql_fetch_row($sql_result) ) {
for ($i = 0; $i < count($cols); ++$i) {
if ($cols[$i] == "" || $cols[$i] == 0) {
unset($cols[$i]);
}
echo "<P>$cols[$i]";
$column[$i] = $cols[$i];
}
}
The problem in this code that it gives me all the columns' names and types and NULL values etc. i want it just to give me the column NAME
i will appreciate any help, sorry for long message![]()
Thank You, FalfoOL[QUOTE]





Bookmarks