Jump to content

Really odd mysqli_fetch_array behaviour


Minklet

Recommended Posts

I'm trying to populate a profile page with information from the database. Really bizarrely, every $row variable that isn't null returns as 'website', which is the database username. I have absolutely no idea why this is.

 

It might be worth noting I have just changed hosts...the only thing I can think might make a difference. Any help would be great, thankyou

 

 

query = "SELECT * FROM member WHERE username='$member'";
$result = mysqli_query ($dbc, $query) or trigger_error ("query: $query\n<br />MySQL Error: " . mysqli_error($dbc));

if ($result) {

while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {

	$member_id = $row['member_id'];
	$username = $row['username_id'];
	$photo = $row['photo'];
	$about = $row['about'];
	$slink = $row['soundcloud_link'];
	$mlink = $row['mixcloud_link'];
	$flink = $row['facebook_link'];
	$dlink = $row['divshare_link'];
	$mylink = $row['myspace_link'];
	$plink = $row['postbocks_links'];
	$website = $row['personal_website'];
	$type = $row['member_type'];
	$status = $row['status'];


}


}

}

Link to comment
https://forums.phpfreaks.com/topic/209908-really-odd-mysqli_fetch_array-behaviour/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.