Page 2 of 2

Posted: Mon Jul 21, 2003 10:54 am
by jamesm87
ok thankyou for that reply.

I am having a slight problem with this script I have made...

Here is my mySQL query in PHP

Code: Select all

$sql="select * from BPB_friends,BPB_online where BPB_friends.friendname=BPB_online.loginname id=('$id') ";
$result=mysql_query($sql);	
$num = mysql_num_rows($result);


And each time it gives off this error

Code: Select all

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/hollyfie/bpb/friend.php on line 9


The script is meant to be a friends list, so in each table

BPB_friends:

ID (ID of the owner of the friends list
freindsname (Name of the friend name added)
block (is this person blocked?)


BPB_online

ID (The Friend added ID)
loginname (the friend added name)
online (the friend added online or not)

any idea's to fix it or to make it better and easier.

Thanks in advance :D

Posted: Mon Jul 21, 2003 3:25 pm
by RTT
you sure that query is correct? Looks a little odd to me...

Posted: Mon Jul 21, 2003 3:52 pm
by jamesm87
thats why I have sent it in...lol anyway i have solved it

Code: Select all

select * from BPB_friends,BPB_online WHERE BPB_friends.friendname=BPB_online.loginname AND BPB_friends.ID = $id