this is what i got to work and this is what its doing. it is part of a mymatch deal, meaning that the member clicks my matches and everyone in the adverts dropdown table that shares what they like , love, romance whathave you.
so first it grabs to find out what they seek.
then i looks in the members and adverts tables to make sure the member is approved and also has not paused their account and also that they have not been suspended and it excludes the session member themselfs from the list.
Then it takes those final results and loads that array query with all their member infomation into the pagination function that uses that information to pull their photo and all that stuff.
then it display those results on the page.
so here is what i got to work, it works fine but i do not know if it is correctly coded as far as using INNER JOIN instead of LEFT JOIN.
All i know is that the output is what i want, but if i can do a better job i will do so.
anyway here is the final result.
//get value of what user is seeking
$resultm=mysql_query("SELECT * FROM adverts_dropdown WHERE adv_userid='$Sess_UserId'") or die(mysql_error());
//now find everyone else with similar values and approved and exclude self
$queryfind="SELECT *, adverts.adv_approved, adverts.adv_paused FROM adverts
INNER JOIN members ON (adverts.adv_userid=mem_userid)
INNER JOIN adverts_dropdown ON (adverts.adv_userid=adverts_dropdown.adv_userid)
WHERE adverts_dropdown.adv_seeking = '$myvalue' AND members.mem_suspend='N'
AND adverts.adv_paused='N' AND adverts.adv_approved=1
AND adverts.adv_userid != '$Sess_UserId' ORDER BY RAND()";
$resultfind=mysql_query($queryfind,$link) or die(mysql_error());
$finallist = mysql_fetch_object($resultfind);
$totmem_rows = mysql_num_rows($resultfind);
$limit = $pager->GetLimit($finallist);
$pager = new PS_Pagination($link,$queryfind,$record_per_page,5);
$rs = $pager->paginate();
what is really strange is that this code works fine on php5 but not on php4, both files are the same, the existing file is running on a php4 environment, i took it from there and just replace this section, which should be fine but it wont run, it just give a white page, but i put the same file no changes on php5 env and it works fine. There is nothing in this section that i can see that is php5 specific so that one totally makes me scratch my head.