Jump to content

[SOLVED] JOIN Query Help


monkeytooth

Recommended Posts

I dunno whats goin on with this.. so, thought I'd ask.. Im new with JOIN queries.. never really played with them before 10 mins ago. So, that said I got the query working fine it lists, etc.. However everytime I am missing one result.

 

If i get 10 hits from the query 9 display, if I get 3 only 2 show.. if I get one nothing shows.. where have I gone wrong? any takers?  ;D

 

$second_query="SELECT * FROM memb_pers, memb_l0g13n WHERE memb_l0g13n.email_addy=memb_pers.email_addy AND memb_l0g13n.crx_typ3='$dex' AND memb_l0g13n.crx_tus='$typ' AND memb_pers.c0unty='$whr'";
$second_result=mysql_query($second_query) or die ("Error in Second query: $query. " . mysql_error());
$second_resultA = mysql_fetch_array( $second_result );
echo "<strong>" . $totalcount . "</strong>";
while($row = mysql_fetch_array($second_result)){
echo $row['namef']. " - ". $row['namel'];
echo "<br />";
}

Link to comment
https://forums.phpfreaks.com/topic/140507-solved-join-query-help/
Share on other sites

Never mind just realized i was nulling out a result due to leaving a second array statement in the above.. removed that got what I was looking for.. thanks for putting any thought into it though for those of you who popped in to read and try to give me help..

Archived

This topic is now archived and is closed to further replies.

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