Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,168 members, 7,957,370 topics. Date: Tuesday, 24 September 2024 at 11:38 AM |
Nairaland Forum / Science/Technology / Programming / Updating A Row (851 Views)
How Do I Automatically Modify A Row In Mysql After A Set Time Using PHP? / Simulate Updating A Record Using Mockjax / Updating A Users Row (2) (3) (4)
(1) (Reply)
Updating A Row by skyhighweb(m): 10:29pm On May 06, 2017 |
hello programmers am having an update issue and i dont know how to go about it am gonna try n explain it the way i can plz bear with me. i have a table called bids and two important column called bidder and tagged when (bidder 5) has no one to tag he simple drops a bid and when another bidder comes along(bidder 3) he tags (bidder 5) i want bidder 5 row to update showing (bidder 3)in his row. for example bidder 5 place bid it looks like this bidder tagged 5 0 no one to tag so it shows zero i want if bidder 5 get tagged by bidder 3 it update showing the person that tag bidder 5 and it will look like this bidder tagged 5 3 from the image i attached u can simply understand what am saying. looking forward to ur replies thanks code i am using to fill the form is below // 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++; }
|
Re: Updating A Row by skyhighweb(m): 10:43pm On May 06, 2017 |
inage
|
(1) (Reply)
Industries That Rely On Drupal For Making Their Websites / Hot Selling Mobimatic!!!!!!!!! / .
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9 |