Jump to content

Sql Problem...


xyn

Recommended Posts

Heya!
I've got my SQL problem, I have a Buddies request system,
When a member receives a new request they must accept or
decline the request, however I get told I have a request
when i don't...

The problem is it ignroes the SQL Query and takes the first option
ie: It selects * (all) from the database where User is "ash"

I want it to check if the buddy is a request or already accepted.

My code:
[code=php:0]$BrSql = mysql_query("SELECT * FROM pm_buddy WHERE bdy_name='{$_SESSION['username']['usr_user']}' AND inf_accept='0'") or die('Error: '.mysql_error().'');
            $BrNum = mysql_num_rows( $BrSql );
            if( !BrNum ){
            echo "";
            }else{
            echo "<tr>
  <td width=\"100%\" class=\"text\">X <a href=\"./index.php?x=buddy.requests\">New Buddy Requests</a></td>
</tr>";
            }[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.