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

learn more… | top users | synonyms

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
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
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
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
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
23 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
31 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
43 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
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 ...
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 ...
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
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
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
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 ...
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
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 ...
0
votes
0answers
35 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
22 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 ...
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 ...
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 ...
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, ...
1
vote
1answer
53 views

wpdb insert and boolean fields

I'm preparing an insert query like this: $wpdb->insert('table', $data, $format); data array will be: $data = array_push($data, 'resp' => true) problem is, what $format shall i use for a ...
0
votes
2answers
34 views

Grouping posts by a custom meta value

I'm trying to output a list of dates that are held in a meta key called event_dates without duplicates. I've also tried a wp_query with a meta_compare but I'm not able to make that work either. Any ...
0
votes
2answers
173 views

Alternative to mysql_real_escape_string

I have a WordPress plugin that at one point I need to see if a certain title exists in the database. For 2 years, this code worked fine: $myposttitle= $wpdb->get_results( "select post_title ...
0
votes
0answers
32 views

How to create and display survey and its statistics?

I am making a new website which will basically have 5 questions of Consumer Confidence Index. So my task is to create a survey which should display in homepage take answers for each 5 key questions, ...
0
votes
0answers
48 views

Would manually deleting the dumping data fix a “#1062 - Duplicate entry '1' for key 'PRIMARY'” phpMyAdmin error?

I'm new to PHP! I'm trying to import an SQL database file into myPhpAdmin for a WordPress I'm migrating, but I keep getting this error message: SQL query: `-- -- Dumping data for table ...
0
votes
1answer
35 views

Update postmeta after theme switch

I am trying to update the postmeta table when I switch themes. I am updating the metavalue to be template-name.themename.php. However, this only works with the default themes in wordpress. If I go ...
0
votes
1answer
767 views

phpMyAdmin error #1062 - Duplicate entry '1' for key 'PRIMARY'

I'm new to PHP! I'm trying to import an SQL file using phpMyAdmin through a GoDaddy cPanel(please don't make fun of me) Here's a full readout -- -- Dumping data for table `wp_commentmeta` -- INSERT ...
0
votes
0answers
24 views

Whats the Mysql Query to Find each display_name stored in wp_postmeta.meta_value, grouped by username?

I created a custom content type that contains some fieds tos store user names (display name), thru a meta.key that is called 'opr'. Now i want a mysql query to find all custom postss date ...
0
votes
2answers
33 views

Plugin generating unexpected output - on WP mysql dump import

I am developing my plugin and I am getting this error: The plugin generated 357954 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with ...
1
vote
0answers
71 views

Slow meta_query with about 4 milion record on wp_postmeta

Although optimized wordpress all the way but still very slow as follows : I have converted from LONGTEXT meta_value field to TEXT Then create INDEX for this field ALTER TABLE wp_postmeta ADD INDEX ...
1
vote
2answers
58 views

Single meta_query query using OR instead of AND in request's WHERE statement

I want the native WordPress search input to search metadata in addition to its standard title and content search, however setting a meta_query adds an AND clause to the request when what I need is an ...
0
votes
0answers
30 views

Long query apache error from spam comments

My hosting company recently turned on the error reporting for slow queries in php/apache and we have seen the error logs get flooded with errors all from queries requesting spam comments on the front ...
-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. ...
0
votes
0answers
16 views

Unable to run wordpress site in WebMatrix after database credential change (db_name, db_user, db_password)

Well, I assumed this would be much easier. I set up wordpress using the Web Platform Installer. It ran with the database it automatically created for me (DB_NAME: wordpress960, DB_USER: ...
0
votes
1answer
33 views

Massive Tags Remove Using MySQL

I am using WordPress 3.4.2 for one of my site and currently it has 38,251 tags Now i want to remove all Tags from my site, so which way will be more safe to truncate every tags my site has.
0
votes
1answer
71 views

How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category

I have tried the following phpMyAdmin query in an effort to delete all posts, from wordpress category 378, that are over 400 days old. delete a,b,c,d FROM wp_posts a LEFT JOIN wp_term_relationships b ...
0
votes
0answers
40 views

Splash pages on a high traffic site

Could use some advice here. We have a fairly high traffic site web site using WordPress. Currently we have two VPS servers managing the site, one that holds WP, one that holds MySQL. The WP servers ...
1
vote
1answer
24 views

How to find meta entries with their posts missing via SQL?

I'm looking to write an SQL query to do the following: Select all postmeta rows where the meta_value = a post id that does not exist. For example, postmeta meta_value may equal 235. Usually this ...
1
vote
1answer
38 views

Why does dbDelta() not catch MysqlErrors?

From what I can see, dbDelta() is designed to suppress database errors that occur during its operation. Generally speaking, this seems to be the case, but New Relic is still reporting MysqlErrors ...
0
votes
1answer
65 views

How Do I Merge Categories With phpMyAdmin

I tried the following phpMyAdmin query to merge my category 112747 into my category 112748: UPDATE wp_term_relationships SET term_taxonomy_id = 112747 WHERE term_taxonomy_id = 112748; It did not ...