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

learn more… | top users | synonyms

-2
votes
0answers
10 views

Troubleshooting MySQL Wordpress

In the process of trying to install iDevAffiliate and creating a new database, I messed up my existing WordPress database. I'm not even sure what I did, but I'm now getting some WordPress errors that ...
-2
votes
0answers
13 views

List Woocommerce product with its category ID - MySQL / PHP [on hold]

I am using a MySQL query to list all product addon variations(swatches), I am able to do this fine, as well as list the product the variation is associated with. The problem I have is listing that ...
0
votes
2answers
43 views

MySQL database gives blank page (white screen of death)

I am currently trying to migrate a live Wordpress site to a local server to do development. I believe I have done most steps correct, but I am only getting a blank page. I am quite certain that this ...
0
votes
1answer
13 views

Write mysql credentials in plugin

I've to create a custom plugin to print data from a database different from the wordpress one. I'm using wpdb. Is it fine, from a security point, to write database credantials in the plugin files in ...
0
votes
2answers
78 views
+50

Why are no posts showing despite my apparently correct DB restoration?

I restored a backup to MySQL using the phpMyAdmin Import feature. When I browse the DB in phpMyAdmin, I see that my posts are there. But in Wordpress, I only see the default out-of-the-box welcome ...
-1
votes
2answers
80 views

Dynamically populate Cascading Dropdown from MySQL using JQuery/AJAX [closed]

What I'd like to achieve is managing tables in the front-end of a WordPress page the same way as MS Access does. So, I'd like to show dependent cascading dropdown which are related by foreign key and ...
0
votes
0answers
12 views

Woocommerce and mysql [closed]

I want to know the user name of the currently logged in user.I want to check for each woo subscriptions orders whether the user name matches with the currently logged in user and find the start and ...
0
votes
0answers
14 views

Update table only if checkbox is clicked

I'm building a little home security project where it should be able to turn the system on/off from a website and by a password on the device. My problem seems to occur with the code from my website. ...
0
votes
1answer
14 views

Help with sorting and storing data on Wordpress

I want to implement something where users can log in and review products and search for products to see reviews. I want to store multiple attributes to allow for really refined searches. I need things ...
0
votes
0answers
12 views

WP Query with multiple posts and meta queries

I have three custom post types: Stories, Venues and Cities. With Advanced Custom Fields I have added a related custom field to each post type. Each Story has a Venue ID and each Venue has a City ID. ...
2
votes
1answer
39 views

SQL query to get adjacent posts from search query

I'm busy rewritting a custom function I have recently written to get adjacent posts according to a tag, category, custom taxonomy term, author or search value saved in the URL I'm using the structure ...
0
votes
1answer
17 views

using same mysql user with many databases

As we know that in order to connect WP with database we should to define mysql username and password in wp-config.php, so at that point i have a question regarding security or ( some sort of ...
0
votes
0answers
18 views

MYSQL sleep process for 20 seconds while site is “waiting for…”

I'm running WP 4.0.1 on an Ubuntu VM server. The server has no outside internet connection, so I have enabled define('WP_HTTP_BLOCK_EXTERNAL', true); in wp-config.php. When I click a link on the ...
0
votes
1answer
29 views

Using WPDB->Insert()

Hello I have been developing in PHP and now am just starting the transition to Wordpress. In PHP I have this -> // Prepare statement $sqlstatement = $conn->prepare("INSERT INTO importtest ...
1
vote
1answer
45 views

MySQL 5.5 upgrade 'broke' Wordpress [closed]

I upgraded from Debian 6 to 7 and during the upgrade, MySQL asked for new root password, I was little confused but typed it anyways. I guess this created a new database called 'mysql', because now ...
0
votes
0answers
14 views

Database Errors and User Permissions [duplicate]

I'm working on a customer's pre-existing site and I notice a ton of errors in the server logs. A typical error is WordPress database error DELETE command denied to user 'xxxxxxx'@'localhost' for ...
0
votes
0answers
11 views

How to make list of checkboxes based of number of distincs value of some custom field?

I need to make list of checkboxes based of number of distincs value of some custom field (Country) for visitors able to choose only post where this field Country the same as they are interested one. ...
1
vote
1answer
14 views

Search and replace in post content

I am about to change themes on my site and also a plugin that creates tabs with a post. I need to replace multi-line text with other multi-line text and can't work out how to do it. I have tried ...
0
votes
0answers
24 views

MySQL 1005 ErrNo 1 - “can't create table” when importing DB backup into phpmyadmin?

I have been developing a WordPress site locally using the following mysql version: LOCAL DATABASE SERVER: Server: Localhost via UNIX socket Server type: MySQL Server version: 5.5.40-0ubuntu0.14.04.1 ...
0
votes
1answer
37 views

WPDB secure custom form

I'm creating a custom form to update rows in a secondary MYSQL DB, different from the one of wordpress. This form is public and every user can access it. So I've created a plugin and I'm using also ...
0
votes
1answer
23 views

Hide Administrators From User List except current user (administrator)

this code works great! the problem is that this code also hide the current user (if administrator) so what i trying to to do is hide all Administrators except current user. i need help to edit sql to ...
0
votes
0answers
15 views

Translate SQL query to wp_database with JOINS into wp_query

StackExchange members! It's so happened that I'm using straight SQL queries in my application. I'd like to rewrite it and use WP_Query, but, unfortunately, I have no idea how to translate, let's say, ...
0
votes
1answer
31 views

MySql Database In WordPress Multisite

I have a multi-site installation. It's a fresh installation, and currently all the sites use the same database. What would you recommend among these and why? Pros and Cons of using the same? Option 1 ...
0
votes
1answer
22 views

How do i get value from wp_postmeta?

I am trying to get a specific value from wp_postmeta, I'm aware about meta_key and meta_value. Problem is Meta value stores lots of values and i want specific value. Here's the value in the ...
1
vote
1answer
36 views

How to search for posts IN OR title OR content OR author?

I have looked at many posts and questions regarding searches for custom meta, but I want to search for posts and include those if the search query matches an author name. I have come up with the ...
0
votes
0answers
60 views

two wordpress sites, two themes, one database, same content

I am doing research about wordpress and there are many interesting stuff to learn, i browse the wordpress forum and i found a post about duplicating site.. or multisite.. I am not sure exactly how it ...
0
votes
1answer
35 views

Why doesn't custom mysql query return results? Is syntax correct?

First time making a custom query. I was looking for a way to get a list of categories for a certain taxonomy so I could run a LIKE query for a autocomplete function. Just to get a few results I came ...
0
votes
1answer
23 views

Wordpress unescape text on mysql?

on database i have field desc with value \'test\' actually the input is 'test' when i gather the field for display it on table, it show \'test'\ not 'test' anyone can know how to change the value ...
0
votes
1answer
35 views

Front end access to a SQL data repository - recommended way?

Building a general data repository, not necessarily related to WordPress elements. What is the recommended way of doing it: Using custom post types? or Building new SQL tables? Please elaborate. ...
0
votes
0answers
20 views

MySQL query to mass change role of users

I'm looking for a MySQL query to achieve this purpose: Change the role of users that never posted and have registered before at least 60 days. The role to be changed to is a new role to be created ...
1
vote
2answers
32 views

wpdb custom post_type problem

I want to use custom post type in my custom SQL query, but, when I add the custom post type im my query, I get no results. Where's my probelm ? This is the code I've tried $top5_ov_performance = ...
0
votes
1answer
23 views

How to select particular month post from table and update the post status using MySQL?

I would like to change the post status for particular month via MySQL command Using SSH...Can you anyone tell me how to do this via SSH. I have number of post more than 40,000 posts, each month i'm ...
0
votes
2answers
29 views

how to check for wordpress Query errors

In mysql or mysqli you can add this type of Query: <?php $sql = mysqli_query($con, Insert into database itt (name) VALUES ($name)") or die(mysqli_error($con)); ?> What does wordpress do ...
0
votes
0answers
28 views

Creating a custom Search Form that links to a custom database?

I'm kinda new in Wordpress and I'm still learning as I go along. Currently, I'm trying to create something like this I have a custom set of database in the server in mysql with a table. The ...
7
votes
1answer
111 views

Reset Post IDs to less than 64bit integer

I have been running Wordpress for many years and have about 26000 posts. At some point my post ids have exceeded a 32bit integer and I am now locked into using Wordpress on a 64 bit system. I am ...
0
votes
0answers
30 views

Can one effectively use non-ClearDB databases on Windows Azure?

Has anyone tried and effectively used a database provider other than ClearDB with WordPress on Windows Azure? I like their service but they are a bit pricey. Since they are the only listed provider ...
0
votes
0answers
29 views

MySQL errors after a Wordpress clone

I've just cloned one of my wordpress installs on to a different domain, but each time I try to go in to certain setting screens through the dashboard, I get the following messages at the top of the ...
0
votes
1answer
57 views

Navigate posts with different post type that are in the same categories

I created two custom post types that share the same category taxonomy. I'm using next_post_link() and previous_post_link() to navigate through posts with the same category but it only works for ...
0
votes
1answer
175 views

Datatabase error: Commands out of sync

I have create function with code bellow: function my_add_new_id ( ) { ... $GetSvrPass = $my_db_connect->get_var ( $my_db_connect->prepare ( 'CALL my_acquireuserpasswd ( %s, @ID, @PASS ) ;', ...
0
votes
0answers
48 views

Meta query with regular expression

I am using regular expression to refine the post it works fine but i want change it such that it can work with meta query instead of post title here is my code function wpse18704_posts_group( $where, ...
0
votes
2answers
40 views

Custom Wordpress Table wpdb

running into issues querying a custom table and getting results. As of Wordpress 3.9, I can no longer run mysql_query(), and have to use $wpdb->query(); So keeping that in mind: Old Code: <?php ...
0
votes
1answer
53 views

Insert double entry in DB

I created plugin and my plugin create new Table in DB. My problem is when user type something in field firstname, lastname... and click on button Submit, that go to my table and that is ok.. but then ...
0
votes
1answer
45 views

How do I properly update the Wordpress database password?

A site that I manage was recently compromised and I am going through the steps to harden and re-secure the site. I would like to change the MySql database password and want to make sure I do not take ...
0
votes
1answer
173 views

mysqli_real_connect() - authentication method unknown to the client Warnings

I keep getting the following warnings in my debug log: PHP Warning: mysqli_real_connect(): The server requested authentication method unknown to the client [mysql_old_password] in ...
0
votes
0answers
17 views

filter wptexturize doesn't work on old posts titles

I have an add_filter('the_content', 'wpt_content');. My function wpt_content does a wptexturize($text). But It's work only on save post, so my old post has bad 'and my new post ’. I don't ...
0
votes
2answers
127 views

Reset/Reorder posts ID in the MySQL wp_posts table

I have a Wordpress site that is considerably popular. I am in the process of optimizing the site before adding other plugins such as the WPML plugin which I suspect will be using custom post types. ...
0
votes
2answers
56 views

Multiple instance of data in plugin custom database table on plugin activation

I'm creating a plugin that adds some data to a custom table created by my plugin on plugin activations. I also created a settings page with a form that users can insert their own data to the ...
0
votes
1answer
19 views

Getting data from Mysql Table..confusing

I've been pulling my hair out trying to figure out how to do this. I'v created a custom field called cp_country. Now each record in Mysql has a value for cp_country. The problem is i don't understand ...
0
votes
0answers
38 views

Adding a Custom Taxonomy Term to sql union query

There is a beautiful solution to getting the next 3 posts before and after the currently viewed post solved here. However, I would like to narrow the query to just a specific taxonomy term in a custom ...
0
votes
2answers
46 views

How can I add a user through SQL?

By mistake I just ran this query: (note the extra ;) DELETE FROM wp_users; WHERE ID = 321; How can I add a user through SQL? I searched around but couldn't find a proper answer to this fairly ...