Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
There’s a different posts and comments table per site, so not really. That said, you can and should keep track of blog ids they’ve commented on in a user meta to speed things up in the first round, and cache the formatted result in a separate usermeta to speed things up in subsequent rounds. These … Read more
I ended up writing a bunch of MySQL statements. My process went: Add users into wp_users. Add first name into wp_usermeta. Add last name into wp_usermeta. Add nickname into wp_usermeta. Add last activity into wp_usermeta. (This is important for BuddyPress; otherwise, users won’t show up in the members-loop) Add name to BuddyPress. Add custom “phone” … Read more
You can use the following method : Export your SQL data and make a CSV file out of it Parse that CSV file in a PHP script and put the data into an array Parse the array and for each row, insert the values into WP You will need the following functions to insert the … Read more
Something tells me that it could be the maximum script execution timing out perhaps. The amount of memory your inserts are consuming could also be the culprit. Are you getting any error messages, blank screens or anything like that? You could try adding the following above where you’re calling the wp_insert_post() function: set_time_limit(0);
I am setting up Subdomain based MU on my domain. Just remember, what used to be called “WordPress MU” is now “WordPress Multisite.” It’s not a separate application, just a configuration setting you use within WordPress. Will I be better off setting the MySQL user’s domain as localhost, 127.0.0.1 or with a wildcard %.mydomain.com? Which … Read more
DISCLAIMER : Only a MySQL DBA, not WordPress expert You could migrate the database as follows: Very first thing is to locate the my.ini for MySQL. Search all data volumes until you locate my.ini Next, login to MySQL and run SHOW VARIABLES LIKE ‘datadir’; This will tell you what folder MySQL data is stored. For … Read more
If I understand your question correctly, this should work: function get_event_info($event_id = 0, $info = ” ) { global $wpdb; return $wpdb->get_col( $wpdb->prepare( “SELECT meta_value from $wpdb->postmeta WHERE meta_key = ‘%s’ AND post_id IN (SELECT DISTINCT post_id FROM $wpdb->postmeta WHERE meta_key = ‘event_id’ AND meta_value= %s )”, $info, $event_id ) ); } Use this like … Read more
So I figured out the issue. I wasn’t familiar enough with how urls are handled in XMLHttpRequest. I needed to change downloadUrl(“http://wp-content/themes/oxygen-child/phpsqlajax_genxml3.php”, function(data) { to downloadUrl(“http://www.theworldsflgiht.com/wp-content/themes/oxygen-child/phpsqlajax_genxml3.php”, function(data) { Thanks for the help everyone!
Following the recomendations of @toscho i had a look at get_results and the following edits to the function ended up doing the trick. if ( ! function_exists( ‘get_meta_values’ ) ) { function get_meta_values( $key = ”, $type=”post”, $status=”publish” ) { global $wpdb; if( empty( $key ) ) return; $r = $wpdb->get_results($wpdb->prepare( ” SELECT pm.meta_value, pm.post_id … Read more