Looping through the mysql_field_name function

From: Date: Sun, 02 Feb 2003 18:24:58 +0000
Subject: Looping through the mysql_field_name function
Groups: php.general php.windows 
Request: Send a blank email to php-general+get-134018@lists.php.net to get a copy of this message
Hi ppl, I have a problem that probably very simple, but i cannot figure it out right now.... I need to get the field names of my database. I have a query like select * from books and now i wanna have both the result and the field name. I have been trying with mysql_field_name, but not succesfully... $i = 0; for($a=0; $a < sizeof(mysql_field_name($db->sqlResult, $i)); $a++) { echo mysql_field_name($db->sqlResult, $i)."<br />"; $i++; } Can anyone help me please.. Your help is greatly appreciated;-) Best regards, Davy Obdam mailto:info@davyobdam.com

« previous php.general (#134018) next »