Php,如果达到一定数量

Php,如果达到一定数量,php,mysql,row,Php,Mysql,Row,我试图使用if语句将db行($row[cost])增加20%,但不包括其他行。到目前为止,我的代码是:$row-->cost/.80,因此我基本上不希望它达到此查询中的maximumbid: $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 Wind

我试图使用if语句将db行($row[
cost
])增加20%,但不包括其他行。到目前为止,我的代码是:$row-->cost/.80,因此我基本上不希望它达到此查询中的maximumbid:

$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");
$result=$wpdb->get_results(“选择bp.*,b.company
来自“windows\u品牌\u产品”bp
左键连接'windows_brands'b
关于bp.brand_id=b.id
加入Windows\u last\u提交
加入windows\u材质wm
其中ls.username='$current\u user->user\u login'
和bp.width=圆形(ls.width)
和bp.height=圆形(ls.height)
和bp.material IN(wm.name)
和bp.type=ls.type
如果(ls.minimumbid!='0.00',则ls.minimumbid之间的bp.cost
和英国石油公司maximumbid律师