Find and Delete SQL Server database Wordpress

jounin89

Active Member
287
37
28
2014
2,635
hello i have a wordpress and a dooplay theme.. and i want to delete all my old link
openload.co and verystream.com on my wordpress site database or .sql anybody knows to do that and explain what is right method
not on manual thing.. just the code or command may be plugin..
 
9 comments

xd12345

Active Member
67
20
8
2021
2,630
ask the owner his insight to this

since the embed link are formatted using json u should look into how to update them using JSON_SET() in mysql
 
Last edited:

xd12345

Active Member
67
20
8
2021
2,630
i just check its not json, it similar but its not.

@jounin89

i suggest u try to use wp_query to get ids of all post that have openload
then use those post ids to remove openload and use wp_update_post()
the data is store in meta_input -> "repeatable_fields"
you can automate it using cron.
 
Last edited:

darkestblue

Active Member
680
369
63
2020
3,355
this script checks your movies-posts and remove player links with openload.co or verystream.com
make a backup and try it in a test enviroment before. work at my tests
i addet this script at wp-content\themes\dooplay\header.php and open the Main page, but this is a very dirty way to run the script, maybe you php config disallow this because of long runtime or memory use


PHP:
echo "START MOVIE EDIT<br>";
$loop = new WP_Query( $array('post_type' => 'movies' ); );

while ( $loop->have_posts() ) : $loop->the_post();

    global $post;
    $repeatable_fields = get_post_meta( $post->ID, 'repeatable_fields' );

    $data_array_tmp = array();        
    $found_bad_url = false;
    foreach ( $repeatable_fields[0]  as $stream_link_object) {
                
        if(strpos ( $stream_link_object["url"] , "openload.co" ) !== false || strpos (  $stream_link_object["url"] , "verystream.com") !== false){
            $found_bad_url = true;
        }else{
            array_push ( $data_array_tmp , $stream_link_object);
        }
        
        if(    $found_bad_url){
            update_post_meta($post->ID, 'repeatable_fields',$data_array_tmp );
        }
    }
endwhile;
echo "FINISH MOVIE EDIT<br>";
exit
Post automatically merged:

damn, did not test las tchanged, current version :

PHP:
echo "START MOVIE EDIT<br>";
$loop = new WP_Query( array('post_type' => 'movies' ) );

while ( $loop->have_posts() ) : $loop->the_post();

    global $post;
    $repeatable_fields = get_post_meta( $post->ID, 'repeatable_fields' );

    $data_array_tmp = array();       
    $found_bad_url = false;
    foreach ( $repeatable_fields[0]  as $stream_link_object) {
                
        if(strpos ( $stream_link_object["url"] , "openload.co" ) !== false || strpos (  $stream_link_object["url"] , "verystream.com") !== false){
            $found_bad_url = true;
        }else{
            array_push ( $data_array_tmp , $stream_link_object);
        }
        
        if(    $found_bad_url){
            update_post_meta($post->ID, 'repeatable_fields',$data_array_tmp );
        }
    }
endwhile;
echo "FINISH MOVIE EDIT<br>";
exit
Post automatically merged:

and again, dont drink and code

PHP:
echo "START MOVIE EDIT<br>";
$loop = new WP_Query( array('post_type' => 'movies' ) );

while ( $loop->have_posts() ) : $loop->the_post();

    global $post;
    $repeatable_fields = get_post_meta( $post->ID, 'repeatable_fields' );

    $data_array_tmp = array();       
    $found_bad_url = false;
    foreach ( $repeatable_fields[0]  as $stream_link_object) {
                
        if(strpos ( $stream_link_object["url"] , "openload.co" ) !== false || strpos (  $stream_link_object["url"] , "verystream.com") !== false){
            $found_bad_url = true;
        }else{
            array_push ( $data_array_tmp , $stream_link_object);
        }
    }
    
    if(    $found_bad_url){
        update_post_meta($post->ID, 'repeatable_fields',$data_array_tmp );
    }
endwhile;
echo "FINISH MOVIE EDIT<br>";
exit
 
Last edited:

darkestblue

Active Member
680
369
63
2020
3,355
hey dude, dont explain me how to do the job.

if you are unable to do the basics i cant and will help you.
without explaining what you try, which error you have and things like this you will not solve your problem
have fun with manuel deleting the entrys
 
Top Bottom