lion_boy877
Active Member
hello i need help i am using wordpress and i want something like that
Here is mysql code which is working fine when execute in phpmyadmin
i want to use it in php format which will work in php when post open on front end which and if else statement run and then else part will auto run and change text in mysql permanently
the meta_value is in longtext format where i want to replace specific word for specific condition do not change every text in that meta_value
if this is not good way then tell me how to do same thing with
Help me out guys
my main purpose is i want to replace text via php coding in mysql table >> wp_postmeta and meta_key >> bulk links and meta_vlaue storing links in longtext format field and it will done auto if condition meet in if else statement
i finally made solution by my self it took whole 1 day to work on very simple thing :D for me its a very big thing lol :P
PHP:
if {
original text will show
} else {
SQL:
UPDATE wp_postmeta SET `meta_value` = REPLACE (`meta_value`, 'text you want to replace, 'Replacement text here');
PHP:
}
Here is mysql code which is working fine when execute in phpmyadmin
SQL:
UPDATE wp_postmeta SET `meta_value` = REPLACE (`meta_value`, 'text you want to replace, 'Replacement text here');
i want to use it in php format which will work in php when post open on front end which and if else statement run and then else part will auto run and change text in mysql permanently
the meta_value is in longtext format where i want to replace specific word for specific condition do not change every text in that meta_value
if this is not good way then tell me how to do same thing with
PHP:
wp_update_post( );
Post automatically merged:
my main purpose is i want to replace text via php coding in mysql table >> wp_postmeta and meta_key >> bulk links and meta_vlaue storing links in longtext format field and it will done auto if condition meet in if else statement
Post automatically merged:
i finally made solution by my self it took whole 1 day to work on very simple thing :D for me its a very big thing lol :P
Last edited: