SQL query for friends

hi there,

i want the following: if i have a request for friendship, then there should be "you have friends" on a special site. now i have the following:

function friedchecker()
{
$fabfrage = db_arr( "SELECT `Check` FROM `FriendList` WHERE `ID`='{$memberID}' " );
}

if ( $fabfrage = 0)
{
echo      'you have a friend request';
}

but it do not work!

i have embedded it in functions.php in template directory, because i want to show new requests on top of the site

thanx

Quote · 8 Sep 2008

WOW - you confused even me. lol - um, thats just all wrong.  Here ya go:

$new_friend_arr = db_arr( "SELECT `ID` FROM `FriendList` WHERE `Profile` = {$memberID} AND  `Check` = '0'  LIMIT 1;" );
if ( $new_friend_arr )
{
//// this is the code if you have a request waiting
}

-

Hope that helps  :)

Chris

www.convictionscommunity.com

Quote · 8 Sep 2008

GREAT !

thanx a lot :-)

that help

Quote · 9 Sep 2008

WOW - you confused even me. lol - um, thats just all wrong.  Here ya go:

$new_friend_arr = db_arr( "SELECT `ID` FROM `FriendList` WHERE `Profile` = {$memberID} AND  `Check` = '0'  LIMIT 1;" );
if ( $new_friend_arr )
{
//// this is the code if you have a request waiting
}

-

Hope that helps  :)

Chris

www.convictionscommunity.com

Chris, how do you apply this code.

Stuart

There are none so blind as those that will not see.
Quote · 9 Sep 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.