Jump to content

skyhighweb

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by skyhighweb

  1. yes they are both fields in the same table and i to exclude rows with the same value
  2. hi ok i implemented where buyer != tagged but it isnt working right it only works if the number are on the same roll eg wont work like this buyer tagged 4 5 2 0 6 4 the 4 above appears like that in the column need the code to check both columns not minding where the data is in the row but works like this i altered it just to check and it works but not the way it should(works cause i put 4 in the same roll buyer tagged 4 4 2 0 6 5
  3. yeah i checked but nothing is showing as fault can u plz implement it in the above codes that will b cool of u
  4. i understand but that because i just rewrote another code to become this one plus i tried implementing urs but once i add it to the code i get blank page so i suppose am doing something wrong
  5. that will b me heres the ccomplete code $query = "SELECT b.auction, b.buyer, b.bid, b.tagged, u.nick, u.rate_sum FROM " . $DBPrefix . "bids b LEFT JOIN " . $DBPrefix . "users u ON (u.id = b.bidder) WHERE b.auction = :auc_id ORDER BY b.bid asc, b.quantity DESC, b.willwin asc"; $params = array(); $params[] = array(':auc_id', $id, 'int'); $i = 0; $hbidder_data = array(); foreach ($db->fetchall() as $bidrec) { if (!isset($bidderarray[$bidrec['nick']])) { if ($system->SETTINGS['buyerprivacy'] == 'y' && (!$user->logged_in || ($user->user_data['id'] != $auction_data['user'] && $user->user_data['id'] != $bidrec['bidder']))) { $bidderarray[$bidrec['nick']] = $bidrec['nick']; $bidderarraynum++; } } $template->assign_block_vars('tag_bidder', array( 'BGCOLOUR' => (!($i % 2)) ? '' : 'class="alt-row"', 'ID' => $bidrec['bidder'], 'NAME' => $bidderarray[$bidrec['nick']] )); $i++; } someone said something about comparing two arrays not sure how to go about it
  6. plz how do i do that with the above code,thank you
  7. need a help with a PHP/MySQL issue. I have a table named bids and two column named buyer and tagged both using int. buyer -------------- 8 5 2 tagged -------------- 5 4 1 I'm trying to detect multiple same entry number. I want if a number appears on both of the columns it shouldnt display on the menu list anymore, like the 5 above hope yo understand. Any tip? code below $query = "SELECT b.auction, b.buyer, b.bid, b.tagged, u.nick, u.rate_sum FROM " . $DBPrefix . "bids b LEFT JOIN " . $DBPrefix . "users u ON (u.id = b.bidder) WHERE b.auction = :auc_id ORDER BY b.bid asc, b.quantity DESC, b.willwin asc"; $params = array(); $params[] = array(':auc_id', $id, 'int');
  8. sorry am not that good in php yet how do i go about this thanks
  9. Am using php MySQL and i have a table which get filled, i want to be able to remove already selected data from list(frontend) automatically to avoid multiple selection and not having two of the same data in the column how do i go about this, thanks. for example, if on the drop menu we have mike Jacob Steve David if someone already selected steve i don't want him to show up on the list plz note i have already exist code, i dont want to use that, thanks
×
×
  • Create New...