Hi
I'm a new user here, new to php and figuring it out as I go along! I've written a query that is supposed return data from column "aid" in database table "downline_builder", based on the contents of columns "mid" and "pid". The url I am loading ends with ?rid=(a number), which is where the data for "rid" comes from.
This is what I have, and it isn't returning anything! (I know the query and result lines could be combined into one, but I'm finding it easier at the moment to break it down into small chunks.)
<?
$memberid = $_GET['rid'];
$hbpro = mysql_query("SELECT aid FROM downline_builder WHERE pid= 51 AND mid= '$memberid'");
$hbproid = mysql_result($hbpro, 0);
?>
Can someone tell me what I'm doing wrong because I'm really stuck with this?