MySQL is an open-source, relational database management system.

learn more… | top users | synonyms

3
votes
2answers
88 views

Wordpress will not operate correctly

My website is ImASpy.com. If you click on the link, Findings, this takes you to my first Wordpress page. It appears to work fine until you click on comments, or you try to go to the about page, which ...
3
votes
1answer
1k views

importing data from non-wordpress mysql db

I have created an import file to get the articles from a non-wordpress db and bring them in as posts in wordpress, I am not sure how to bring over the thumbnail image into my custom field I defined as ...
3
votes
1answer
474 views

Return ID of authors who have at least one post

I found a great piece of code here that returns the ID's of users by role. What I would like to do is modify it so it only returns the ID's of the users who have at least one post. I have tried to ...
3
votes
2answers
115 views

Query meta field using between

I'm trying to Query some lattitude and logitude and then I get some long numbers and apperently the Query dont like that. Let says I have these in the database Meta-key: lat Meta-value: 54.3415000 ...
3
votes
3answers
609 views

Fulltext search in posts sorted by relevancy

I'm building a custom search page and what I need is to sort results by relevancy (eg. occurences of a keyword) Using MySQL docs I've built this query: SELECT ID FROM $wpdb->posts WHERE MATCH ...
2
votes
3answers
2k views

Retrieve featured image

We are building an Android app based on a Wordpress mysql database. We were able to get most of the information from the datase to display on to the app. Now all we have left is to retrieve the posts ...
2
votes
3answers
785 views

Programmatically changing role information; editing role name and deleting

I am making system where I am delegating a lot of functionality to the front end of a system using Wordpress. I have listed all the roles (most of the custom) and need to ability for a logged in user ...
2
votes
2answers
3k views

Get Previous & Next posts by Post ID

How can I go about getting the previous and next posts from outside the loop? Everything I try to do aside from the custom SELECT query (using get_posts or WP_Query) breaks stuff further down the ...
2
votes
1answer
1k views

How to Delete Old Comments by Date?

I run a contest/giveaway blog at www.mommylivingthelifeofriley.com and currently have over 160,000 comments on 1100 posts. I would like to find a way to delete all comments from my site which are ...
2
votes
1answer
945 views

How to disable `SQL_CALC_FOUND_ROWS` [duplicate]

Possible Duplicate: wordpress query causing load In the site I'm trying to optimize, I noticed several queries that are rather slow and start with SELECT SQL_CALC_FOUND_ROWS Searching this ...
2
votes
2answers
1k views

If I consider changing my WordPress DB tables to InnoDB, will it have an effect on the way WordPress works?

I found a superb post here about optimising WordPress for large installs. One of the steps refers to lighthttpd which sounds excellent but isn't currently supported by DirectAdmin. Last time I messed ...
2
votes
2answers
4k views

How to validate WordPress generated password in DB using PHP?

I am working with site that is done with WordPress, and I need to add some parts that are outside WP, and to check user login, Logging users outside WP. I tried with md5 of password but it's not... ...
2
votes
2answers
888 views

modify all posts of a category to “no comments allowed”

I'm looking for a way to modify all posts of a certain category to be "no comments allowed" without going into each post settings, one by one, and modifying manually. Perhaps a MySQL statement? ...
2
votes
2answers
111 views

WordPress for a very large website

I've searched and searched but I did not find an answer online. Also, I've posted this on StackOverflow and apparently it wasn't ok and I reposted this here. I hope it's ok. I have this website which ...
2
votes
1answer
728 views

Can I use MariaDB instead of MySQL in wordpress?

Is it possible to use MariaDB instead of MySQL in Wordpress installation? If possible: how do I do that? Is there any drawback or complexities?
2
votes
2answers
425 views

How to do a MySQL dump from production site without using a search and replace script for local development?

I performed a MySQL dump of my WordPress production database to be imported into my local development environment. I plan on frequently performing this database dump and import. Is it possible for me ...
2
votes
1answer
665 views

How to change post format from Aside to Image for all posts?

I have a blog where all the posts had the post format Image. This morning I see that somehow they have all been changed to Aside. I'm still trying to figure out how this happened, but in the ...
2
votes
2answers
425 views

Database slowdown after update to 3.4.1

I own a wordpress installation, and Updated to 3.4.1. After the upgrade, I got a very strange slowdown to my wordpress. After all, I used the define('SAVEQUERIES', true); in my wp-config.php with ...
2
votes
1answer
347 views

How is the data stored in the database?

I have years of experience with PHP and MySQL, but just starting to develop plugins for WordPress and need some help. Currently, I am working on a plugin that will add extra functionality to another ...
2
votes
2answers
386 views

sql query to put quotes around numbers in img tag

I have quite a few old posts that contain an img tag with height and width with no double quotes around the numbers. For example: <img height=319 alt="" ...
2
votes
1answer
72 views

Using $wpdb Class to Pull Recent Comments Across a Network

Been looking for a clean and simple way to produce comments from across a network using the $wpdb database class. I did find this answer, which has been protected, and is four years old. I wrapped ...
2
votes
2answers
608 views

Concurrent / simultaneous MySQL connections

I've been looking for the best WordPress hosting for me and I'm wondering how many MySQL connections at once WordPress requires? I know this is kind of general question but how does it look for you? ...
2
votes
1answer
988 views

Inserting Hundreds of Thousands of Posts at Once

I have a project in which I create an array of 200k+ lines w/ 25 fields that run the wp_insert_post and update_post_meta. To start it processes pretty fast the slows down a lot after 10k records or ...
2
votes
1answer
964 views

Get multiple custom field values in a $wpdb query [duplicate]

Possible Duplicate: How to query posts based on lat-lng coordinate as post meta? I want to create a $wpdb query that select the closest places (custom post type) near the current ...
2
votes
2answers
4k views

Where is the content of widgets stored in mysql table

I have the cPanel access to a website but no wordpress login info. So I wants to change a widget content in the website. How can I change it through phpmyadmin. Where are that widgets sidebar data ...
2
votes
2answers
219 views

Tons of Twitter rows in my database

I have 264,307 "http" (post_type = http) rows in my wp_posts table. 99% of those have them have this post_title: GET http://twitter.com/statuses/user_timeline/@xcentric.json?count=100 and "error" ...
2
votes
1answer
754 views

Problems with DBDelta with FOREIGN key?

I have the following sql I am using with dbDelta: $sql .= "CREATE TABLE " . $location_table . " ( location_id MEDIUMINT(9) NOT NULL AUTO_INCREMENT, name VARCHAR (100), ...
2
votes
1answer
487 views

Split a database will improve performance?

Hi to all I'm running a Wordpress MS installation and I would like to move a couple of heavy "sub" blogs on a different DB, will it encrease my performances? Actually I'm on a dedicated server with ...
2
votes
1answer
72 views

How to run scripts when a new blog is created in Buddypress?

I'd like to insert some mysql data into every new blog that's created on my buddypress system. How can I hook up to the newly created blog data? ID, for example, would allow me to insert it right from ...
2
votes
1answer
167 views

Ordering Post 2 Post admin meta box by meta from CPT

I've just started using Posts 2 Posts (brilliant plugin by the way) in combination with a custom post type called "Artist" and the WP Event Manager Plugin. My aim is to use P2P to link Artists to ...
2
votes
1answer
113 views

little help with a mySQL query to wp database

@t31os gave a very helpful response to: getting all values for a custom field key (cross-post) by providing this function if ( ! function_exists( 'get_meta_values' ) ) { function get_meta_values( ...
2
votes
1answer
2k views

Check if post of title already exists

I'm writing a plugin that takes an xml feed and posts it into WordPress using wp-cron Everything is working dandy, except it keeps adding the same posts over again. So, I'm working on a system to ...
2
votes
1answer
49 views

can database and media folder be moved to a different drive?

I have to move my site from Drive C:\ to Drive E:\. Is there a better way to do this than uninstalling the following: Wordpress PHP MySQL Apache and re-installing on Drive E:\? For example, how ...
2
votes
1answer
54 views

What is the most secure way to set up the MySQL user in WPMU?

I am setting up Subdomain based MU on my domain.Everything is hosted by me running on one CentOS/Webmin VPS. Will I be better off setting the MySQL user's domain as localhost, 127.0.0.1 or with a ...
2
votes
1answer
719 views

Use ajax to update_post_meta

2 days ago I asked this then I tried to work on my code to be able to understand how ajax and php work and now I have a new issue that, probably would be easily solved. These are my codes: <?php ...
2
votes
1answer
247 views

Multipart/formatted MySQL query problem

I'm creating a plugin and I want to automate the creation of a MySQL Trigger on a table. The problem seems to be that $wpdb->query doesn't appear to accept either multipart statements and/or formatted ...
2
votes
1answer
724 views

How many 'wp_insert_post' calls can be performed in one shot, in a very long 'for' loop?

I'm working on a plugin which has bulk post inserts using a spreadsheet. This spreadsheet can have multiple thousand rows, each row corresponding to a post. I'm parsing this spreadsheet, looping over ...
2
votes
1answer
3k views

Importing users to Buddypress with custom fields

Here's the setup: The client uses a proprietary custom-coded PHP CMS and is wanting to move to WordPress with BuddyPress. The old, custom CMS has a roster functionality, which I'm using BuddyPress ...
2
votes
2answers
106 views

Update a Wordpress post or page takes 60+ seconds

Since updating to Wordpress 3.5 I've had my updates of pages and posts become excessively slow. I've been timing them and they take 40-80 seconds to update. I've spent the last 2 hours reading and ...
2
votes
1answer
2k views

How to get a Google maps SQL->XML->map marker tutorial to work in WordPress

I have been trying to figure out what is wrong with my code for a couple days now, and I can't seem to crack it. I am trying to follow this tutorial I tried all three of the suggested methods to ...
2
votes
0answers
266 views

wp_admin edit.php slow with lots of queries

I have about 4,000 posts. Currently when I click on All Posts (edit.php) it's taking about 10 seconds to load and I'm showing approximately 1000 queries! Most of them look like... SELECT t.*, tt.* ...
2
votes
2answers
312 views

Grouping related postmeta data via SQL query

I am using someone else's WP plugin which stores lots of related data in wp_postmeta using an "artificial key". So effectively we hijack wp_postmeta to create a nested relational database. So one row ...
2
votes
0answers
243 views

How to let a user choose an authors and save it to the database?

I have a multi-author Wordpress site which reads different rss feeds and posts them to my page. I was wondering if it is possible to make a code that would provide an opportunity to registered user ...
2
votes
1answer
115 views

theme options echoing multiple times

I tried to strip down the Twenty Eleven theme options page and add my own fields correction: I followed a tutorial somewhere, but when I try to echo the data, it comes out multiple times. Here is my ...
2
votes
1answer
854 views

PHP/MySQL issues when running WP on EC2 cloud [closed]

I am trying to create a wordpress blog on an Amazon EC2 instance. The amazon base image had apache and php already installed. I installed MySQL manually in my user directory. I am able to login to the ...
1
vote
3answers
441 views

Insert all post IDs in new database table

I have a plugin which creates a new database table. Upon activating the plugin is there a way to insert all my posts ids into that table? Right now I'm using an action hook to immediately insert the ...
1
vote
3answers
478 views

Search and replace text across all posts

I had used the ZD Video Plugin for WP a long time, and now, since my move to WP 3.0.2, it doesn't work anymore. To embed a YouTube video using the plugin, I would just write ...
1
vote
1answer
754 views

Wordpress 3 - how are passwords stored and how do I compare to them?

For reasons I can't go into right now, I'm creating a form that will allow users to change their passwords for Wordpress by entering their current password and then entering the new password. I want ...
1
vote
3answers
98 views

Styling images coming from another blog

I had asked a question earlier, on getting post-thumbnails from another WP-site. There, the awesome Mike coded a SQL query whose results are then passes on to a PHP array. The piece of code from that ...
1
vote
3answers
2k views

Convert wordpress posts to products in Woocommerce

Is there anyway I could convert all the posts e have right now on our Worpdress install into products using some mysql query or something like that?