I want to get the first field name ONLY
Posted: Thu Aug 16, 2007 12:07 pm
feyd | Please use
I want to get the first field name ONLY. is there any mysql command to do that?? help me please 
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
i have a problem with my table.
here is my code:Code: Select all
<?
$str="show tables from $DBname";
$query=mysql_query($str) or die(mysql_error());
while(list($table)=mysql_fetch_row($query))
{
$strfield="show fields from $table";
$queryfield=mysql_query($strfield) or die(mysql_error());
while(list($Name) = mysql_fetch_row($queryfield))
{
echo $Name;
}
}
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]