Kategori : Wordpress ...

16
01
2024

Wp bulk user delete with sql

Kategorisi : Wordpress

DELETE
wp_users,
wp_usermeta
FROM
wp_users
INNER JOIN wp_usermeta ON wp_users.ID = wp_usermeta.user_id
WHERE
wp_users.ID IN (1,2,3);


15
08
2023

Find and Delete Users from WooCommerce

Kategorisi : Wordpress

DELETE FROM b_users
WHERE
b_users.ID NOT IN (SELECT
meta_value
FROM
b_postmeta

WHERE
    meta_key = '_customer_user')
AND b_users.ID NOT IN (SELECT DISTINCT
    (post_author)
FROM
    b_posts) LIMIT 100

;
DELETE FROM b_usermeta
WHERE
b_usermeta.user_id NOT IN (SELECT
ID
FROM
b_users);


20
06
2016

Woocommerce bulk price update

Kategorisi : Wordpress

update w_postmeta set meta_value = meta_value * 1.25 where meta_key=’_price’


28
07
2015

Tüm featured images kayıtlarını silmek

Kategorisi : Wordpress
functions.php'ye bu kodları ekliyoruz.

add_action ('init', 'remove_featured_images' );

function remove_featured_images () {

global $wpdb;
// The following query will only unset the featured image, it will not delete it.
$wpdb->query( "
    DELETE FROM $wpdb->postmeta
    WHERE meta_key = '_thumbnail_id'
" );
}

01
06
2015

Wp post_title kontrolü

Kategorisi : Wordpress

$post_if = $wpdb->get_var(“SELECT count(post_title) FROM $wpdb->posts WHERE post_title = ‘some text'”);
if($post_if < 1){
echo “var”;
} else {echo “yok”;}


04
08
2014

Toplu tarih değişimi – wp

Kategorisi : Wordpress

Toplu tarih değişimi – wordpress

UPDATE wp_posts SET post_date = ‘2014-08-04 17:02:52’ WHERE post_type = ‘post’ AND ID LIKE ‘%63%’


07
07
2014

Bir kategorideki tüm yazıları silmek – sql – wp

Kategorisi : Wordpress

Bir kategorideki tüm yazıları silmek için gerekli sql kodumuz :

delete a,b,c,d
FROM w_posts a
LEFT JOIN w_term_relationships b ON ( a.ID = b.object_id )
LEFT JOIN w_postmeta c ON ( a.ID = c.post_id )
LEFT JOIN w_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id )
LEFT JOIN w_terms e ON ( e.term_id = d.term_id )
WHERE e.term_id =1


27
05
2014

WordPress çifte içerikleri silmek

Kategorisi : Wordpress
SELECT a.ID, a.post_title, a.post_type, a.post_status
FROM wp_posts AS a
   INNER JOIN (
      SELECT post_title, MIN( id ) AS min_id
      FROM wp_posts
      WHERE post_type = 'post'
      AND post_status = 'publish'
      GROUP BY post_title
      HAVING COUNT( * ) > 1
   ) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = 'post'
AND a.post_status = 'publish'

------------------------------------------


DELETE a.*
FROM wp_posts AS a
   INNER JOIN (
      SELECT post_title, MIN( id ) AS min_id
      FROM wp_posts
      WHERE post_type = 'post'
      AND post_status = 'publish'
      GROUP BY post_title
      HAVING COUNT( * ) > 1
   ) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = 'post'
AND a.post_status = 'publish'

19
04
2014

WordPress postmeta da boştaki kayıtları temizlemek

Kategorisi : Wordpress
DELETE pm
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL

18
02
2014

WordPress çifte ( duplicate ) kayıtları silmek – sql

Kategorisi : Wordpress

DELETE a.*
FROM wp_posts AS a
INNER JOIN (
SELECT post_title, MIN( id ) AS min_id
FROM wp_posts
WHERE post_type = ‘post’
AND post_status = ‘publish’
GROUP BY post_title
HAVING COUNT( * ) > 1
) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = ‘post’
AND a.post_status = ‘publish’



photo

Php, ajax, jquery, mootools web programlama. Linux, apache, lamp sunucu yönetimi. Cpanel, plesk, lxadmin panel kurulumlari.

20 / 04 / 2024, 09:20:35
Web yazilim, grafik
barbetto.com

Tunalioglu.org - 2015