mysql组更新多个在哪里

I want to multiple update mysql fields.

<?php
    if (isset($_POST['sb'])) {
        $site_title = mysql_real_escape_string($_POST['site_title']);
        $site_url = mysql_real_escape_string($_POST['site_url']);
        $admin_email = mysql_real_escape_string($_POST['admin_email']);
        $allowed_extension = mysql_real_escape_string($_POST['allowed_extension']);
        $crawler_status = mysql_real_escape_string($_POST['crawler_status']);

        if (mysql_query("update shop_option set shop_field ='$site_title' where shop_key='site_title'"))
            print 'updated';
        else 
            echo mysql_error();
    }
?>

On above code, I can only update one field. I need to run multiple update they are my update rules:

update shop_option set shop_field ='$site_url' where shop_key='site_url'
update shop_option set shop_field ='$admin_email' where shop_key='admin_email'
update shop_option set shop_field ='$allowed_extension' where shop_key='allowed_extension'
update shop_option set shop_field ='$crawler_status' where shop_key='crawler_status'

How can I multiple update mysql when each Where is different?

You can do it using case and in:

update shop_option
    set shop_field = (case when shop_key = 'site_url' then '$site_url'
                           when shop_key = 'admin_email' then '$admin_email'
                           when shop_key = 'allowed_extension' then '$allowed_extension'
                           when shop_key = 'crawler_status' then '$crawler_status'
                      end)
    where stop_key in ('site_url', 'admin_email', 'allowed_extension', 'crawler_status');

EDIT:

Barring a spelling error in the above query (which is quite possible), does the following return anything?

select *
from shop_option
where stop_key in ('site_url', 'admin_email', 'allowed_extension', 'crawler_status');