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

learn more… | top users | synonyms

1
vote
1answer
37 views

Query Wordpress database by registered date and role

I would like to get the display name and email address for all users who have registered to my multisite today with the role of subscriber. It needs to be an SQL query as it's used outside of the WP ...
1
vote
1answer
63 views

Separate DB by yearly archive of Wordpress

I have large DB of blog post I already export it by year and wanted to make archive by year doing it on subdomain, like 2012.mysite.com I stack looking for solution on internet, I wondering if their ...
1
vote
1answer
261 views

How to optimize 'select found_rows()' query? Several 'high load average' alerts daily

I have 5,000 regular posts, 6,000 posts in one post type and 2,000 posts in another post type. Needless to say, that has made the wp_posts table quite large. Not to mention, I have custom taxonomies ...
1
vote
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 cant seem to crack it. I am trying to follow this tutorial: ...
1
vote
1answer
105 views

Custom order for Mysql array

I have a Page of Posts, each post has a Custom Field "expired" which contains a date in the format YYYY-MM-DD which is used to order the posts. This date is used for a script that tells the visitor if ...
1
vote
1answer
228 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 ...
0
votes
1answer
83 views

meta_query on a date range using an array of values

How can I do a query to return the post if the custom field array contains a date that is within the specified range? The query below is basically what I am after but it does not work... // the ...
0
votes
1answer
27 views

Splitting One Big WordPress Site into Multiple Small Sites

I have a very big WordPress site and I am facing speed issue and server resources issues. Specially numbers of MySQL records are so high. So, I want to split the big WordPress site into multiple small ...
0
votes
1answer
191 views

How to display Shop Products in a Table Format with Column Headings as Custom Attributes in WooCommerce WordPress

I have already entered my products along with their custom attributes into my WooCommerce system and am looking to customize the look and layout of the Shop page to display products in a tabular ...
0
votes
1answer
15 views

optimise SQL wordpress call

I have this code : $querystr = " SELECT * FROM {$wpdb->prefix}posts INNER JOIN {$wpdb->prefix}postmeta m1 ON ( {$wpdb->prefix}posts.ID = m1.post_id ) INNER JOIN {$wpdb->prefix}postmeta ...
0
votes
1answer
33 views

Size article thumbnails and retrieve them directly from database

I've integrated the Wordpress database directly with my .NET application. What I want is to set the featured image of a post. This featured image must be maximum 800pixels wide, and automatically ...
0
votes
1answer
245 views

use wordpress to create user on external database

let me try to explian what i wanna achieve, I have wordpress site and a project management system from codecanyon here is the link. http://codecanyon.net/item/freelance-manager/1225423 i have ...
0
votes
1answer
211 views

How to import database table as custom post type and custom fields?

I have a sql table that contains vehicle information. When I import the database table to my WordPress website, I need the information to be imported as custom fields for a custom post type. For ...
0
votes
1answer
157 views

Unique Post Meta Values

I want to use Unique IDs like YouTube video IDs and WordPress post IDs in a custom field 'youtube_id'. I just created a front-end add post page and want to check if 'youtube_id' used or not used in a ...
0
votes
1answer
57 views

Get data from 3rd table

I have 3 tables: wp_posts wp_metadata users When I get my query from wp_posts I'm using LEFT JOIN to get the data from the wp_metadata, but how can I get a value from the 3rd table users? ...
0
votes
1answer
64 views

Copy url from post_content to custom field

I'm new to MySQL so I don't know if this is even possible. I would like to copy a url that's in post_content to a custom field. The url is variable and it looks like this: ...
0
votes
1answer
34 views

Extending the database

I'm trying to add an extra column to the comments database which will store the user ID of the post/page author. This is part of a plugin which will display new comments in reply to either a post or ...
0
votes
1answer
42 views

Merging versions of wp_posts based on post_title

I have a live site and a backup/dev version of the site. For some reason (probably because I did an export from Moveable Type then moved everything from localhost to a live environment I had little ...
0
votes
1answer
71 views

Group posts by meta_key

I have a Problem with grouping meta_values. The Query looks for posts with the meta key "company". I want a unique listing of the colors like: blue red yellow array_unique was not successful and also ...
0
votes
1answer
123 views

Second ezSQL initialization for MSSQL

We are trying to pull data from a second database into Wordpress. The secondary database is used internally to store data, and Wordpress (also only used internal) is partially used to display some of ...
0
votes
1answer
542 views

How can I debug my database connection for unit testing?

I've set up a wordpress environment on my Mac with MAMP and I'm running 3.5.1 locally (i.e. http://localhost:8888/blog works). I'm trying to run the unit test suit from wordpress.org and having ...
0
votes
1answer
57 views

Print output of Table Creation

I am creating a few tables and I getting the following message: The plugin generated 440 characters of unexpected output during activation. If you notice “headers already sent” messages, ...
0
votes
1answer
45 views

Convert many posts from having a specific meta_key to use a post_format

I have 350 posts that were using a plugin-provided option stored in a meta_key ("custom_post_template", to be precise). I want to convert these posts to assign them a specific post_format ...
0
votes
1answer
115 views

How do I Split one Table into to lists for two seperate drop down boxes

I am driving myself crazy trying to find an answer, although I know it would most likely be something simple.\ I have a mysql table with the following columns: id first_name family_name ...
0
votes
1answer
32 views

Problem with a query in custom posts

I'm making a search form to select available rooms. I have a custom post for the rooms called "Products" and a post meta value called "availability" (format: Y-m-d). And I want to find all rooms ...
0
votes
1answer
36 views

Filtering problem

I got the custom_post_type_data in which I store some variables when I make a new post. Variables likes Author, Price etc. I implemented a filtering by author, so when you click on James (for ...
0
votes
1answer
221 views

Contact form with database integration issue

This is more a question about the idea I am going to share and ask for advice for. I would like to have a contact form on my site, where people complete their data and it gets stored inside a ...
0
votes
1answer
51 views

finding out the top 5 source ( source is a custom taxonomy ), in a given category

The client I'm working with have thousands of articles and media ( audio/video ) files. To WordPress, all are posted by Author ID 1, which we named as STAFF. All the content though in reality has ...
0
votes
1answer
216 views

How to check for empty and not a failure

I'm querying the postmeta table to see if a url has already been entered, using this statement (where $thisLink is the url I'm checking) $mypostids = $wpdb->get_results("select * from ...
0
votes
1answer
101 views

Using custom tables for old posts

I have a site with about 24,000 posts and 200 posts daily and the database will get huge soon. So I plan to transfer the old posts to custom tables to reduce the database load. There's no need to show ...
0
votes
1answer
156 views

Efficiently loop over huge number of posts

I want to loop all posts to do some processing, but one of my concern is there are many posts and it might used up my memory, so I want to loop posts with offset, something like paging. e.g. $posts ...
0
votes
1answer
29 views

Assign a tag to custom post type using a query

I have a custom post type courses with a custom field level. I want to run a query (mysql or WP query) that runs through every course (post) and if the level is greater than 3, append a tag called ...
0
votes
1answer
73 views

sql for querying post and their category

I'm trying to query the wordpress database for the post and what category they belong in. Is there a sql query that I can use for this? Thanks,
0
votes
1answer
121 views

Drop posts from categories in MySql

Is there a way to remove all posts from all categories? I found plugin for this, but it's very slow. What I need is MySql query that will help me remove all posts from all categories. If you know how ...
0
votes
1answer
25 views

Multiple Wordpress Pages

Not sure how to approach this one. I have a wordpress page that uses a mysql query to grab info from a database based on the page title. I basically want to replicate that page to 50 or so ...
0
votes
1answer
770 views

Advanced Custom Fields Array Population

I'm trying to populate a ACF select field with an array from a custom $wpdb->get_results call, which is essentially a list of categories from my db. I have the following: global $wpdb; ...
0
votes
1answer
52 views

If the only thing I use MySQL for is Wordpress, do I need MySQL's timezone tables?

The only thing I have MySQL around for is Wordpress. Some MySQL features, I gather, require you to import the system timezone database into special tables in the mysql database. (Which seems like a ...
-1
votes
1answer
124 views

Importing Concrete5 content to WordPress

Are there any tools out there to convert content from a Concrete5 database to something WordPress can use? I have a client that may switch over, and would like to avoid manually copying content over ...
0
votes
0answers
47 views

how to prevent words inside image tags from being update in a sql query via php

I need to update certain words inside wp_posts table (1032 posts in a specific time range) but I would like to exclude some words when they are inside tags like so: <img ...
0
votes
0answers
379 views

How to fix database error duplicate entry

At first I thought this was just a damaged table, so I tried repairing via MySQL, but it appears there's more fundamental issues. Which of the duplicates should I remove, and any further advice in ...
0
votes
0answers
155 views

Using mysql queries to delete custom post types based on meta_value

I am trying to create a cron job to run on my server which deletes a custom post_type (post_type = event) from my databse based on a meta_key (st_date) and a meta_value (the date the event took place ...
0
votes
0answers
108 views

Using HyperDB to connect to a MS SQL database

I have successfully split my WordPress database into two MySQL databases (using hyperDB). And it works well. Now I want to dive into the unknown and have one database use MYSQL and the other MS ...
0
votes
0answers
75 views

Wordpress post saves until Apostrophe (’) is used

I've installed wordpress onto a fresh VPS with nginx + php-fpm, the installation works fine apart from whenever I post something with a ’ the post ends there. It's looks to be some sort of escape ...
0
votes
0answers
123 views

Custom query on Wordpress custom table

I am working with a custom table where some values will be inserted or updated if they already exists, I have checked and rechecked the syntax and it seems to be working fine, if I run the same query ...
0
votes
0answers
66 views

Automatically create a user with author rights from outside of Wp-admin

Need to create a user on the fly based on the following steps... User clicks a link in an email with a unique url such as 1234.domain.com/?auth=42344245534534535 when the user clicks through to ...
0
votes
0answers
109 views

Wordpress and BigDump

I am having a bit of a nightmare situation. I was given a testarea on a subdirectory of a friend's client server as a temporary favor in order to test my wordpress site. The path is as follows: ...
0
votes
0answers
23 views

instantwp how to shutdown mysql for testing?

I am using instantwp for a standalone project and i need to try out the follow scenario/problem: "instantwp seems to be running but WP can't established a database connection" This happened to me by ...
0
votes
0answers
25 views

Dissapered all posts by 2013 year

Dissaperd all posts posted in 2013. There are no posts, images and tags for this year. I've checked it in the phpMyAdmin and find them. But they don't shows in administrtor panel. Any idea? Thanks!
0
votes
0answers
235 views

Use $_GET with permalinks on page

I'm currently trying to use a $_GET to populate a MySQL query with in a URL on another page within a Wordpress site. URL sample: <a href="http://site.com/file.php?alabama">Alabama</a> ...
-1
votes
0answers
21 views

InnoDB full text search with WordPress

Now MySQL 5.6 support full text search on InnoDB, is it possible to make WordPress use of the full text index to speed up the search?