Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,413 members, 7,954,650 topics. Date: Saturday, 21 September 2024 at 04:56 AM |
Nairaland Forum / Science/Technology / Programming / Need Assistance With This (951 Views)
Assistance With Ethereum Smart Contracts In Python (2) (3) (4)
Need Assistance With This by skyhighweb(m): 10:36am On Mar 25, 2017 |
need your help here, am trying to deduct balance from minimum_bid in auction table, it working fine but problem is its only deducting from the top of the column instead of the what item is being displayed at the moment below is the code, thanks. // work out & add fee $query = "SELECT minimum_bid, fee_type FROM " . $DBPrefix . "auctions"; $db->direct_query($query); $row = $db->result(); $fee_type = $row['fee_type']; if ($row['fee_type'] == 'flat') { $fee_value = $row['minimum_bid'] * $qty; } |
Re: Need Assistance With This by hollyfat(m): 10:46am On Mar 25, 2017 |
My observation is that you are only querying the table without any condition. It will automatically select the first entry. Try using a WHERE Clause |
Re: Need Assistance With This by skyhighweb(m): 10:55am On Mar 25, 2017 |
hollyfat: tried using that but it seem to either stop working or still select from the first entry column in the auction table are id fee_type minimum_bid |
Re: Need Assistance With This by hollyfat(m): 6:41pm On Mar 25, 2017 |
You will have to use the id of the currently viewed item in the where clause |
Re: Need Assistance With This by skyhighweb(m): 7:06pm On Mar 25, 2017 |
hollyfat:yeah i have seen it was missing a auc_id |
(1) (Reply)
Web App Have Evolved To A Point Where They Provide Levels Of Interactive / Be A Software Tester- API Testing And API Test Tools / Chrome Extensions Which Make Gmail More Powerful
(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. 8 |