Author Topic: HELP ME PLEASE...URGENT  (Read 96 times)

matrix_6

  • Newbie
  • Posts: 1
  • Thanks: 0
    • View Profile
HELP ME PLEASE...URGENT
« on: March 03, 2010, 05:00:04 PM »
Hi all,

Actually I am making a php search containing table of userid, . I have adopted the search querry and got the result as the user id, name, joinmonth, itname, intid. I want result in level wise as it is for a MLM company. 1st I want to search the userid month wise. Then also I have to again search the database (By which I have to make the search result as intid) again I want to search the database by the help of intid and also want to add the result that i get. I have used the following search code. Made the search twice. As it was for 10 times, I have used the code again and again and made the result. The source code I have given below. How ever I am not able to get the proper addition from the result. Its urgent. Please any body help me....!!!

my code for 1st level search



<?php
print "<b>"."LEVEL - 1"."</b>";
print "<br/>"."<br/>";
$searchQuery = mysql_query("SELECT * FROM `levelchart` WHERE UPPER(`intid`) LIKE
'%$newq%' ORDER BY `userid` DESC LIMIT 10");
while ($row =
mysql_fetch_assoc($searchQuery))
{
echo "<b>";
echo "User ID - :"."</b>";
echo stripslashes($row['userid']);
echo ", "."<b>"."Name - : "."</b>";
echo stripslashes($row['name']);
echo "</b>"."<br/>";
}

?>

Code for the 2nd level

<?php
print "<br/>"."<b>"."LEVEL - 2"."</b>";
print "<br/>"."<br/>";
$searchQuery = mysql_query("SELECT * FROM `levelchart` WHERE UPPER(`intid`) LIKE
'%$newq%' ORDER BY `userid` DESC LIMIT 10");
while ($row =
mysql_fetch_assoc($searchQuery))
{
$intid = stripslashes($row['userid']);
$searchQuery1 = mysql_query("SELECT * FROM `levelchart` WHERE UPPER(`intid`) LIKE
'%$intid%' ORDER BY `userid` DESC LIMIT 10");
while ($row =
mysql_fetch_assoc($searchQuery1))
{
echo "<b>";
echo "User ID - :"."</b>";
echo stripslashes($row['userid']);
echo ", "."<b>"."Name - : "."</b>";
echo stripslashes($row['name']);
echo "</b>"."<br/>";
}
}
?>

It that write ???? But how to add the result that I get from search querry???