skyhighweb Posted May 8, 2017 Share Posted May 8, 2017 (edited) hi programmer i have an issue here.so let me explain better, if david place a bid but doesnt tag any one the column looks like thisbidder......taggeddavid ..... 0and if someone else(mike), place a bid and tag davidthe column look like thisbidder......taggedMike ..... davidthis shows both mikes and david rowsbidder......taggeddavid ..... 0mike ..... davidu can see david row doesnt update, it should show mike and not 0, hope u understand.below is the code am using to fill the form // tag someone $query = "SELECT b.*, u.nick FROM " . $DBPrefix . "bids b LEFT JOIN " . $DBPrefix . "users u ON (u.id = b.bidder) WHERE b.bidder NOT IN ('b.tagged') and b.tagged IN ('b.bidder') and b.auction = :auc_id "; $params = array(); $params[] = array(':auc_id', $id, 'int'); $db->query($query, $params); $i = 0; while ($row = $db->fetch()) { $template->assign_block_vars('tag_bidder', array( 'ID' => $row['bidder'], 'NAME' => $row['nick'], 'TAGGED' => $row['tagged'] )); $i++; } Edited May 11, 2017 by cyberRobot added [code][/code] tags; indented code Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted May 11, 2017 Share Posted May 11, 2017 this shows both mikes and david rows bidder......tagged david ..... 0 mike ..... david u can see david row doesnt update, it should show mike and not 0, hope u understand. What does your code for updating the database look like? Do you have code for updating David's record when he's tagged by someone else? What is supposed to happen if Sue places a bid and also tags David? It seems like David's bid record should be 0, unless he tags someone else. If you need to know who tagged David, you would search for any references to him in other people's tagged column. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.