php - How do I write a SELECT IF statement with 2 conditionals? -


so got php code here:

select status , if(type = '" . mysqli_real_escape_string($con,$type) . "' , type, '') status novacorp.status type = '" . mysqli_real_escape_string($con,$type) . "' limit 1; 

i want add conditional it'll select status if info column equal pass using escape string shown above.

same statement:

update `novacorp`.`status` set `status`=". $status ." `type`='" . mysqli_real_escape_string($con,$type) . "'; 

if(type=whatever , info=other, valueiftrue, valueiffalse) 

is want


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -