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

learn more… | top users | synonyms

0
votes
1answer
18 views

Complicated MySQL Query

I'm trying to build a directory of members that has some search options at the top. Each member has several custom fields as well (using Advanced Custom Fields). Would like to have a single query ...
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 can't seem to crack it. I am trying to follow this tutorial I tried all three of the suggested methods to ...
0
votes
1answer
8 views

how to insert missing tags into the posts through mySQL?

I am looking for a SQL query to insert a tag to multiple posts from a specific category. A pseudo query looks something like this: INSERT INTO POSTS VALUES TAG = "tagName" where Posts ...
0
votes
0answers
33 views

Can't Post to my Wordpress Anymore!

I'm at my rope's end with this whole thing and have tried everything I can to solve it. I have a WordPress site with a SQL database on Azure, but recently all of the users associated with the site ...
0
votes
0answers
15 views

new multisite, old db

I'm trying to get my old posts from a WP install that was in a sub-directory on my site, into a new Multisite install on a new host. The new install is doing what it should. the problem is the posts ...
0
votes
0answers
6 views

Wordpress Database Duplicate Entry Error (Cron specific)

This is one error that my website is continuously generating in the error log file. WordPress database error Duplicate entry '59199038' for key 'PRIMARY' for query INSERT INTO `admission_options` ...
0
votes
1answer
32 views

SQL - Pull products of particular category from a remote WordPress store db

I connected to the db and successfully pulled products data. Now I want to to display products from specific category. The store is using woocommerce. The landing page is in different location so I ...
0
votes
2answers
758 views

MySQL Syntax Error upon restoring database from backup

Performed a bad import to my Wordpress install and decided to restore from the mqSQL backup (full export) I had made minutes earlier. Dropped all tables in the database and then did an import from my ...
0
votes
1answer
25 views

Slow Wordpress admin panel with a total query time of 1664ms

I have a problem with my wordpress website, he is realy slow, i installed a debug bar to check queries in the home page, the result is like: 202 queries, and a total query time equal to 1665ms The ...
0
votes
0answers
9 views

Getting categories from DataBase & WP Favorite Post

I am trying to create a shortcode that pull the most saved posts (using WP Favorite Post) and displaying them by YEAR, MONTH or CATEGORY. So far I have been able to get the year and month working ...
0
votes
0answers
10 views

How to migrate the posts from an old custom legacy blog to a new WordPress website?

I have to migrate the posts of a very old custom legacy blog made in ASP (the posts are stored in a MySql table) into a new WordPress blog. So I need your help to find the smartest solution to do it, ...
0
votes
1answer
402 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
2answers
36 views

How many Wordpress SQL Queries per page?

I am on a shared hosting which has a limitation at MySQL queries per hour. My shows unable to connect to database because of this. Can anyone tell me how many queries are per page on a wordpress site ...
0
votes
0answers
20 views

Get a list of the last posts grouped by author and filtered by category

i need a list of the latest post published by various authors, but filtered by category, like for example the latest posts of author that write about music. i wrote this query and looks like working ...
0
votes
1answer
404 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
24 views

retrieve wordpress post-meta using php not wordpress functions

I am trying retrieve wordpress postmeta USING PHP not WORDPRESS functions, it needs to be in php no wordpress functions please. this is what I have: $resultat = mysqli_query($con,"SELECT * FROM ...
0
votes
1answer
454 views

Create an user on external database

I have wordpress site and a project management system from codecanyon. Here is the link I have disabled registration for users in project managment system, only login is enabled. I need to make users ...
1
vote
3answers
324 views

Site running slow on new server?

I recently uploaded a website to a new 123-reg server on a single WP installation (www.moseleycoachsales.co.uk). I had developed the site on my own hosted multisite environment ...
1
vote
1answer
285 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 ...
0
votes
1answer
32 views

Which is better and faster ? Wordpress Queries or SQL Query

Suppose I am developing a minimal theme, the the post page single.php displays only the post title, the excerpt and the content. So in general that would be <?php the_title(); ?> <?php ...
0
votes
2answers
44 views

mySQL queries are executed twice on wordpress website

I'm sorry for my english. I'm trying to add some functionalities at my Wordpress website and to do this i have added a function in my function.php theme. The idea is to save in a custom table some ...
0
votes
1answer
547 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 ...
2
votes
2answers
280 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 ...
0
votes
0answers
21 views

Restore database from .frm and .ibd [migrated]

I had a WordPress website running a long while ago. I used WAMP server. Then, I uninstalled WAMP. Today I would like to work again on my website; all that remains of my database is this (I cannot find ...
1
vote
1answer
903 views

Split WP install between 2 databases?

Is it possible for Wordpress to work from two databases? The reason I ask is that we're approaching our 100mb limit for database size on our host (1and1) but have up to 100 databases, so what I was ...
1
vote
2answers
69 views

Add “Category” to Mysql Query

i need your help :) I've made this custom Mysql query on WordPress: $querystr = " SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE post_id IN( SELECT DISTINCT ...
0
votes
1answer
18 views

WP_Query hit max joins… How else can I build a search function that uses custom fields?

I'm trying to search a custom post type of "Properties", while doing so I'm also searching the custom fields using multiple (anywhere from 5-30) meta_queries. The problem is Wordpress or MySQL is ...
0
votes
1answer
314 views

wpdb->insert multiple record at once

So after I have created the table 'settings-table' i want to add a couple of records to it. This is how I want to do it, not the best way, so I need a better way to do this because I will add more ...
0
votes
1answer
24 views

Get author posts count after excluding a category

I want to display the posts count of each author, but posts that are in some categories should be excluded from the count. I tried doing this with count_user_posts( $user->ID ), but this function ...
0
votes
0answers
24 views

Writing directly to WP_Posts table

We directly add posts to WP_Posts table using filemaker. Once the post has been published, however, wordpress seems to be disregarding the existence of certain fields. For example, we have data in ...
0
votes
1answer
30 views

Adding custom tables to Wordpress

I have a database which has thousands of rows of data in each of the tables. I would like to migrate this database into a Wordpress website. I would like the user to be able to log in to Wordpress ...
1
vote
3answers
914 views

importing users where password is provided as md5 + much metadata

I have a spreadsheet that was provided to me of users to import to a new site I have built. I was provided with the password in MD5 hash form. I suspect if I insert this into the password field in ...
0
votes
0answers
15 views

Does Anyone Know How To Shard A MYSQL Database With HypderDB?

I have a woocommerce site with 80,000 products. It's on pretty speedy VPS (8GB RAM, 4CPUs, SD hard drives) and it's configured pretty well (nginx, php-opcode caching, w3 total cache, etc.) but when ...
0
votes
0answers
34 views

How to fetch post and related information from post and postmeta table in WordPress?

I want to fetch post information and its related meta information in WordPress setup. Is it possible from single SQL Query? Post table columns: ID, post_title, post_content Post Meta columns: meta_id, ...
0
votes
1answer
272 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
0answers
32 views

Importing data from database to WP_list_table

How can I import data from a table where Ive got : ID, Name, LastName, Adress and class and by the way, how do I create this plug-in? Any examples?
0
votes
0answers
17 views

Is MySQL query_cache useful for WordPress?

Starting from 5.6, if you use InnoDB as the default engine and query_cache is now officially disabled. We've a quite moderate traffic wordpress site and experience a major downtime when we upgraded ...
6
votes
4answers
3k views

How can I find the source of slow queries in Wordpress?

I have a WordPress site with more than 8000 posts and everytime I add a new one the site becomes unresponsive. I checked the MySQL slow queries log and found out that it is performing a select that ...
0
votes
0answers
36 views

call stored procedure without parameters

I asked this question last week, but then I deleted it because it was stated to be off-topic because I use a function within buddypress. However, I am convinced that whatever I am doing wrong is more ...
0
votes
1answer
31 views

Active DB queries in Wordpress?

I just make some researches regarding to wordpress DB queries and I just wonder if I miss something a normal SELECT query for example in Codeigniter with active records would look like if I assume I ...
0
votes
0answers
23 views

Populating a form with SQL queries

Being a 'learning by example' kind of guy, I've populated a form using this code; <?php $meta_key1 = 'area'; $postids = $wpdb->get_col( $wpdb->prepare( " SELECT ...
0
votes
1answer
895 views

MySQL Query that looks for post with Custom Field, then changes Category

I'm looking for a MySQL Query that will look for all the posts with custom field "meta_key_I_want_to_find", then if the custom field is detected, add a category to that post. The category has already ...
1
vote
1answer
46 views

No wp-config.php file on local install of wordpress - site still displays

I've installed Wordpress locally using XAMPP and this step by step guide by Sunny Johal(Fifth post down on that page). The first time I used the step by step and ran all 3 of the SQL codes(UPDATE ...
1
vote
1answer
744 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
0answers
32 views

Change post category via MySQL

I'm currently building a management program that works separately from Wordpress but interacts directly with the Wordpress MySQL database. I have it working updating, adding and deleting posts and ...
-1
votes
2answers
27 views

SQL Database Lost

I lost my database and when they restored the files, I had two files in a database directory that I assume are the data for my database. How do I recover my database using these two files. ...
1
vote
1answer
326 views

Large Woocommerce Site (83,000 items), What Can I Do? [closed]

So I have a really large woocommerce site (partsboss.co) that has around 83,000 items. It's on VPS hosting with digitalocean, and things were running super fast until around 50,000 items. Now the ...
3
votes
2answers
484 views

How to prevent execution of default query, while preserving ability to use WP_Query in template?

PROBLEM: I'am trying to prevent execution of default WordPress query for custom category template. I have found a possible solution, but looks like it preventing execution of all post queries: ...
0
votes
1answer
23 views

Why this query is not showing any result on wordpresss home page?

I am learning wordpress database, And I have written this query for showing the data from the post table with id=2, but not showing anything. What is wrong with the following query? please help. ...
0
votes
1answer
47 views

How to make an sql query to exclude everything but custom taxonomy terms in table wp_terms?

Problem Summary: I am trying to write a SQL query that returns only my custom taxonomy terms, but the table (wp_terms) contains all of the terms, even ones that I don't want (such as category terms, ...