UPDATE wp_posts set post_content=REPLACE(post_content,'<script src="http://uoauer.com/si"></script>','<!--Cleaned-->') WHERE LOCATE('<script src="http://uoauer.com/si"></script>',post_content)
Bin Way
===================================
SELECT
tbl_column,
BIN(tbl_column) AS binray_not_needed_column
FROM db_table
ORDER BY binray_not_needed_column ASC , tbl_column ASC
-----------------------
Cast Way
===================================
SELECT
tbl_column,
CAST(tbl_column as SIGNED) AS casted_column
FROM db_table
ORDER BY casted_column ASC , tbl_column ASC
SELECT price_range, count(*) AS num
FROM
(select case when product_price >= 150 and product_price <= 249.99 then '150-249.99'
when product_price >= 250 and product_price <= 299.99 then '250-299.99'
when product_price >= 300 and product_price <= 399.99 then '300-399.99'
when product_price >= 400 and product_price <= 499.99 then '400-499.99'
when product_price >= 500 and product_price <= 999.99 then '500-999.99'
else 'over 1000'
end as price_range
FROM washing_machines
WHERE 1
) AS price_summaries
GROUP BY price_range
-- change wp_ to your database's table prefix
-- change oldurl, newurl
-- oldurl is the one in the database already
-- newurl might be your localhost or development address
UPDATE wp_options SET option_value = REPLACE (option_value, 'http://oldurl','http://newurl');
UPDATE wp_posts SET guid = REPLACE (guid,'http://orldurl','http://newurl');
# Dev to Production
SET @uri_from = 'www.devurl.local';
SET @uri_to = 'www.liveurl.net';
UPDATE wp_options SET `option_value` = REPLACE(`option_value`, @uri_from, @uri_to)
WHERE `option_value` LIKE CONCAT( "%", @uri_from, "%" );
UPDATE wp_posts SET `guid` = REPLACE(`guid`, @uri_from, @uri_to);
UPDATE wp_posts SET `post_content` = REPLACE(`post_content`, @uri_from, @uri_to);
UPDATE wp_postmeta SET `meta_value` = REPLACE(`meta_value`, @uri_from, @uri_to);
#From bash
#Stop mysql service
$> service mysqld stop
#Start mysql "for free". Seems dangerous :P
$> mysqld_safe --skip-grant-tables --skip-networking &
$> mysql -uroot
mysql> use mysql;
mysql> UPDATE user SET password=PASSWORD('nuevo_pass') WHERE user='root';
mysql> quit;
$> service mysqld restart