Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2014-11-10 21:42:08

Registered: 2014-11-06
Posts: 26

Single value query (post.php)

Hi everyone

Trying to get a single value from the users table
but not working, the query and error shown below
$pun_user['username'] contains the correct value.

	// If the user is logged in we get the username and email from $pun_user
	if (!$pun_user['is_guest'])
		$username = $pun_user['username'];
		$email = $pun_user['email'];
$result = $db->query('SELECT gender FROM '.$db->prefix.'users WHERE username='.$username) or error('Unable to fetch gender value', __FILE__, __LINE__, $db->error());
$gender = $db->result($result);
Error: Unable to fetch gender value.

Last edited by eddie (2014-11-11 06:43:12)


Board footer

Powered by FluxBB 1.5.8