View Single Post
Old 02-01-2013, 11:39 AM   PM User | #3
needsomehelp
Regular Coder

 
Join Date: Oct 2009
Posts: 306
Thanks: 4
Thanked 3 Times in 3 Posts
needsomehelp can only hope to improve
I did try that one, but not understanding how to get the field names.

Code:
$result = db_query($mysqli, $query);	$columns = $result->field_count;

for($i = 1; $i < $columns; $i++) {
							echo($result->fetch_field_direct());
							// echo($result->fetch_field_direct()->name);
							?><?
							} ?><br><?
									while($row = $result->fetch_assoc()) {
											foreach ($row as $r) { ?><? echo $r; ?><?
											} ?><br><?
									}
needsomehelp is offline   Reply With Quote