I am trying to use an if statement to increase a db row ($row[cost
]) 20% up to but not including a different row. As of now my code is: $row-->cost/.80 so I basically want it to not hit the maximumbid which is held in this query:
$result = $wpdb->get_results( "SELECT bp.*, b.company
FROM `windows_brands_products` bp
LEFT JOIN `windows_brands` b
ON bp.brand_id = b.id
JOIN Windows_last_submissions ls
JOIN windows_materials wm
WHERE ls.username = '$current_user->user_login'
AND bp.width = ROUND(ls.width)
AND bp.height = ROUND(ls.height)
AND bp.material IN (wm.name)
AND bp.type = ls.type
AND IF (ls.minimumbid != '0.00',bp.cost BETWEEN ls.minimumbid
AND ls.maximumbid,bp.cost <= ls.maximumbid)
ORDER BY b.company ASC");
Question being how do I reference row minimumbid so I can prevent this 80%increase from hitting maximumbid?