Link to home
Start Free TrialLog in
Avatar of axessJosh
axessJosh

asked on

MYSQL result set seems to be multiplied by 6

I have a result set that is displaying information, but is taking my DB content and showing each result 6 times.

I'm sure I'm overlooking something simple.

if(isset($_GET['refID'])) {
	$refID = $_GET['refID'];
	$queryDet = "SELECT tbldeposit.depDate, tbldeposit.depAmnt, tbldeposit.depDesAcct, tbldeposit.depMemo, tbldeposit.depTender, tbldeposit.depLineID, tbldeposit.depBnkID, tbldeposit.depClientID, tbldeposit.depFundSrc FROM tbldeposit, tbldeposittotals WHERE tbldeposit.depLineID = '$refID'";
	$detResult = mysql_query($queryDet) or die(mysql_error());
	
		while ($rowDet = mysql_fetch_assoc($detResult)) {
		$detID = $rowDet['depAmnt'];
		$detRef = $rowDet['depLineID']; 
		
		echo $detID . " " . $detRef . "<br />"; 
	}
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of axessJosh
axessJosh

ASKER

forgot to remove that second table join when I updated the statement.  Thanks.