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

learn more… | top users | synonyms

2
votes
0answers
233 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 ...
1
vote
0answers
12 views

Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin

I have a wordpress table like so (phpmyadmin and MySQL) | id | meta_key | meta_value | +----+-----------+------------+ | 1 | import_id | abc | | 2 | import_id | abc | | 3 | ...
1
vote
0answers
25 views

Calculate average crossing post categories

In my WP database I have some posts i the category hotels and some other posts in the category visits. In the posts (placed in the category visits) there is two meta_fields ( rating and placeid ) ...
1
vote
0answers
31 views

Writing into MySQL Table

I'm trying to write some data from the frontend into a custom database table. As long there is no value in the input field this script creates an empty line in the database table, but if the input ...
1
vote
0answers
53 views

How to track a users progress through pages by inserting data into Wordpress Database?

My website users can learn British Sign Language through Video Tuts, Quizzes and games etc. I would like to track the users progress through the pages of the course and add that data to a Wordpress ...
1
vote
0answers
280 views

$wpdb->insert() does not Insert record in a table

I'm trying to understand and get hold of the $wpdb global object but can't seem to make it work. Basically, I'm trying to insert a single record into a custom table in wordpress DB. Instead of ...
1
vote
0answers
131 views

Wordpress running SQL query to update database from form

Basically I want to take information in from a form and use a separate php page to update the database. so here is the original wordpress php page (add_person.php): <?php /* Template Name: ...
1
vote
0answers
258 views

Cleaning up bloated wp_postmeta table by removing multiple _thumbnail_id's?

On a very old site (7 yrs) with a lot of posts (30k) I've been trying to whittle down the database tables. The postmeta table is 1.5m rows, 750k of those rows are for a meta_key named ...
1
vote
0answers
388 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 ...
1
vote
0answers
103 views

WordPress plugin overloading with tmp tables

I have asked at the plugin's (WordPress Popular Posts) support a few days ago, since no response hope to get some insight or help here. Thanks. Hesitant to tweak settings like max_heap_table_size ...
1
vote
0answers
206 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.* ...
1
vote
0answers
275 views

WordPress Query wp-terms SLOW

I've got a very large database in WordPress with lots of products in WooCommerce along with quite a bit of taxonomies. When querying the products on the front end it takes 1 minute or more. Here is ...
1
vote
0answers
70 views

Regex to turn embedded images in to attachments

I've got a blog that has all images embedded in each post rather than a thumbnail linking to an attachment page which is what I'd like. I understand from this question that no plugin (like Regenerate ...
1
vote
0answers
173 views

Retrieve/get current image from Nextgen gallery db

I thought that I can do it using the database where the idea was to get the image from the ngg_gallery_pictures table, where the browser URL is equal to URL of the image in the table. Then I will get ...
1
vote
0answers
150 views

Query most popular terms by taxonomy over 2 week period

I have written SQL for a query that pulls the most used taxonomy terms for selected taxonomies that are published, do not have a parent post are not in a comma separated list over the past two weeks ...
1
vote
0answers
181 views

List authors with the last post title and order by last post date

I want to list authors with last post data and order them by last post date. Now i have this codes but i don`t know how to edit them. // Selects from tables wp_users and wp_posts, selecting published ...
1
vote
0answers
50 views

How can I make wordpress suppress mysql errors?

Wordpress has two functions related to SQL queries and their errors as mentioned in What Is The Difference Between suppress_errors() And hide_errors() in $wpdb? From what I've read setting WP_DEBUG ...
0
votes
0answers
17 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 ...
0
votes
0answers
9 views

wp_insert_post another database with custom field

wp_insert_post with the command you want to transfer the contents to another database, I use the following command <?php require('wp-config.php'); $conn = mysql_connect($dbHost, $dbUser, ...
0
votes
0answers
24 views

Import posts into SQL

Is there a way to bulk import posts directly into the database? like from csv into sql database. I don't want to use those csv import plugins since they don't always work they either only import half ...
0
votes
0answers
35 views

SQL query to remove first image in all posts

I've built a site up over a few years (3,500+ posts) where I've inserted images using the traditional method into the post content itself. I'm now moving to a different theme, and have made the first ...
0
votes
0answers
20 views

Best way to execute custom page-specific mysql queries

I would like to query a secondary mysql database (not the Wordpress mysql database) with page-specific queries. I've seen many answers / tutorials on setting up a secondary mysql database, like: ...
0
votes
0answers
6 views

Archive list with only years and months belonging to a category

I need to generate a list of years and months belonging to a category. For example I have two main categories (A and B). I need a list of years and months of post published only of the category A and ...
0
votes
0answers
38 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
0answers
44 views

MySql Query very slow

I have a problem with a query on my website. When I load the page it is incredibly slow and only after over 12 seconds the content starts showing. I have installed a debug plugin and found the query ...
0
votes
0answers
18 views

wp_term_relationships has term_relationship_id of 0, causing issues with backup

After bulk tagging posts via mysql, I may have inserted a bunch of rows into my wp_term_relationships table that have a term_taxonomy_id of 0. I believe this causing issues when i try to backup the ...
0
votes
0answers
31 views

Using the same shortcode to show any table from the database

I have a little question for you. I want to create a shortcode that makes a table with data that I have stored in a database. But i want to send the shortcode an attribute, to specify which table ...
0
votes
0answers
40 views

Choosing the right server for a big WordPress site with buddypress

I started working in a WordPress site with buddypress and I need to choose a server. They have 1.9 million users in the database and they are estimating to have like 250,000 views every month. The ...
0
votes
0answers
35 views

Renaming admin user on multisite install by MySQL

As part of a general tightening of security, I want to change the name of the admin user on my multisite install to something less commonly used. This user is admin on all five sites in the network ...
0
votes
0answers
23 views

Moving WordPress site to a new server - Admin not loading

I'm trying to move a WordPress Database from one server to another. I've done this a few times with other sites and servers and I use Sublime to do the find and replace and I've had no issues up to ...
0
votes
0answers
47 views

Unable to install WordPress on Plesk 11 Windows based machine

I am trying to install WordPress on a Windows server. The install was not able to create wp-config.php itself, so I created it and put in the database values. Now I get errors like this table doesn't ...
0
votes
0answers
87 views

SQL Query to select post thumbnail, post title, post content from a category

I use the db of my wordpress blog to develop a mobile application in Java. For this, I need the SQL query to display the thumbnail of a post, the title and the content in a selected category. I think ...
0
votes
0answers
23 views

After importing data to new DB with new name, receiving a constant MySQL warning

I've just spent several hours trying to understand why a WP install is really slow, I tracked it down to the database and realised everything in the db was just running super slow with the debug bar ...
0
votes
0answers
41 views

Self-added mysql column as custom fields value

I am trying to add a value from a column that I've added myself to the wp_posts table as a custom field. So right now there is a column called 'shares' which holds an int value and I want that int ...
0
votes
0answers
35 views

Why does my WordPress front-end categories plugin gives me a database error with my SQL syntax?

A few years back I created a plugin based off of an answer here: How do I create a way for users to assign categories to a post from the frontend? Here's a pastebin of the modified plugin: ...
0
votes
0answers
50 views

MYSQL Join on meta key value?

I have very basic mysql knowledge (able to update and join tables) and am using phpMYAdmin but I am trying something just beyond my level now. I have looked at many other questions and answers but ...
0
votes
0answers
56 views

Why are my WordPress post queries so slow?

I'm working on a larger WordPress site and trying to troubleshoot why my site is so slow. I've installed W3 Total Cache and have run multiple page speed and plugin tests with no luck. What's strange ...
0
votes
0answers
39 views

Display image in descending order from database table

I have used woo commerce plugin ,I am trying to display images in descending order by order_id in word press dashboard on orders tab.I tried lot's but not getting any idea how to do that.Bellow is my ...
0
votes
0answers
18 views

Display Title by tags ( mysql )

I want to display in a sepparated page all the titles ( with link ) and a short description ( first 30-40 words from an article ) by a specific tag. For example, i use a "SPECIFIC TAG" on all my ...
0
votes
0answers
85 views

Export One Gravity Form Entry to Multiple Rows

I have a Gravity Form to register for a class. One submission could register multiple people. Gravity Forms, itself, displays and exports this as one entry with multiple columns for the different ...
0
votes
0answers
66 views

why is $wpdb->update() causing a DB error from within wp_set_password()

I have a page-template for my custom theme that enables the user to reset their password from the front-end. I'm calling wp_set_password() and everything runs but the password is not changed in the ...
0
votes
0answers
56 views

How to reconnect to the wordpress database after the connection has timed out

I am writing a plugin that uses the database a lot to store product details from the Amazon Product API and I'm getting a lot of MySQL Server has gone away errors. The server that I'm working on is ...
0
votes
0answers
149 views

Custom Post Type or Custom Tables?

I am trying to build an application that takes 2 pieces of input from a user and saves it to the database. This is how users enter these two pieces of input; this form will be displayed using ...
0
votes
0answers
199 views

Insert & Upload image into data base in wordpress without using media library & plugin?

Here i am trying to insert image into WordPress database with custom code but i am not able to insert and uplode i am very new to wordpress any body have any idea how to do it?Bellow is my code with ...
0
votes
0answers
34 views

Unable to access MySQL in Powweb

I wanted to retrieve my data in powweb's mysql but I get an error: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'snursing'@'walcustweb1601.int.bizland.net' (using ...
0
votes
0answers
46 views

Delete junk text from all the post using my sql command

Because of an autoblog plugin, my site has got junk text in every post! The text format is as below .. funny-pictures/funny-pictures-of-the-day-30-pics/attachment/funny-pictures-41-2/" ...
0
votes
0answers
32 views

Wordpress Update Links

I just need a little help in WordPress query or a plugin which can update all internal links used as hyper link or directly with pages to WordPress normal url i.e ?page_id=69 I have created a website ...
0
votes
0answers
85 views

featured image not showing up with mysql_connect

i noticed a certain problem with the featured image issue, i had everything work nicely until i added a mysql connection to another database to retrieve certain information, the featured image stop ...
0
votes
0answers
102 views

One-time bulk MySQL copy post_date values to Advanced Custom Field (date field)

Disclaimer First of all let me say this is probably mostly MySQL related and unfortunately I'm nearly a total newbie on database language and commands. The problem Situation is a site running ...
0
votes
0answers
99 views

Import Excel (or csv) Table with user-data as subscribers to wordpress

i have a tough problem. From an existing database with user-data I need to transfer those users as subscribers to my wordpress database. My user-profiles have various additional custom fields that I ...