Serialize data before inserting into the DB
WP functions… Serialize: maybe_serialze Unserialize: maybe_unserialize
WP functions… Serialize: maybe_serialze Unserialize: maybe_unserialize
You could start from today and just work backwards, one day at a time: $start_hour = 8; $end_hour = 17; $date = new DateTime; foreach ( $posts as $post ) { $time = sprintf( /* Left-pad time values with zeros to two digits */ ‘%02d:%02d:%02d’, /* Random hour between start and end */ rand( $start_hour, … Read more
Post meta data is stored in the wp_postmeta table, the prefix wp_ may also be something else depending on your setup, in the meta_value column. If there isn’t a metabox in the post edit screen for updating the value, then instead of modifying the database directly you could temporarily add update_post_meta() call to your functions.php … Read more
It probably is a host issue. Assuming that you’re relatively stock WordPress, the queries shouldn’t be so inefficient that they’re causing timeouts. When it says a “remote mysql database”, does that mean a remote database server with the same hosting company, or does it mean you’re using a database server that’s physically located somewhere else? … Read more
The query_posts() inside your database call is being evaluated first, on the current site, and returning an array – which is probably empty, since its not the database you were expecting to be querying. Then that array of posts is being passed to the outer $hbldb->get_results() call, which is giving you your error, because it … Read more
As far as I know there is nothing native in WP to parse CSV files and stuffing this into database directly doesn’t seem like a good idea either. You can parse your CSV with PHP, see fgetcsv() for starters. Then use update_user_meta() to create those values.
To export everything in the database, go to your hosting provider’s control panel such as CPanel and find out how to do “an SQL dump”. An SQL dump is a text file containing the SQL script to rebuild your database on your local computer. You can often do that in software your host may provide … Read more
Just do: delete from wp_usermeta where meta_value = “tonetone” Don’t you actually mean to delete the rows from wp_users, as opposed to just the metadata?
See Initialization Script for “Standard” Aspects of a WordPress Website? and my plugin WordPress Basic Settings for details. You may also use a custom install.php but that’s somewhat tricky for multi-site setups.
You’re not going to get cross domain cookie sharing working. Browsers will not allow domaina.com to access cookies set for domainb.com and vice versa. Subdomains can share cookies set for the parent domain. So domaina.mydomain.com and domainb.mydomain.com can access cookies set for .mydomain.com