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

learn more… | top users | synonyms

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
1answer
88 views

wpdb_prepare with multiple or condition

I want to execute a query like this: $wpdb->prepare( "SELECT * ... from ... WHERE ( post_title LIKE '%%%s%%' or post_content LIKE '%%%s%%' )..., $string ); If I do the query with only one ...
0
votes
0answers
100 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
1answer
40 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
2answers
125 views

Installing local to live WP into subdirectory

I am having a bit of trouble moving a local WP site live and into a subdirectory. I want a static homepage for now (index.html in the root folder) while I work on the live site (would be found in ...
3
votes
1answer
112 views

Can I explicitly specify ENGINE=InnoDB in Wordpress?

I converted all my tables to InnoDB, but the MySQL server (which I can't access, as I'm on shared hosting) has MyISAM as the default, so every new table that Wordpress creates (e.g. when I add a new ...
1
vote
0answers
165 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: ...
0
votes
0answers
124 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
1answer
98 views

Is altering a default WordPress database table update safe?

I want to add some table columns to the wp_terms table. Is it safe to use the dbDelta function with a modified CREATE-MySQL query for this? Or will I run into problems in the long turn? Is it update ...
1
vote
3answers
493 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 ...
0
votes
1answer
45 views

Wordpress VIP realpath Alternative?

I am running a scan for a site to be proposed to wp vip. The only error I am getting is : Warning: Returns canonicalized absolute pathname header-payroll.php require_once ...
0
votes
1answer
250 views

Query sql for truncate post_content in wp_posts table

Hello all i need remove all info in Wordpress posts content and i'ld like do it from phpmyadmin with a query. I need remove only the text and images from all posts content but not the entire post, so ...
0
votes
0answers
158 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 ...
0
votes
1answer
82 views

Having problem creating local instance of wordpress site

I am trying to make a copy of a wordpress site on my webhost on my local computer. I am using EasyPHP. I downloaded all of the files within content and added them to a folder within ...
0
votes
1answer
5k views

Order by DESC, ASC in custom WP_Query

I need to do multi-level ordering in a query. The issue is with ordering one value DESC and the other ASC as in SQL. The following SQL seems to give me what I want when I run it in terminal: SELECT ...
0
votes
1answer
51 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
0answers
124 views

WordPress 3.6 generating empty database

I wanted to migrate my local WordPress i use for theme development to 3.6, but the generated tables in the database are empty. WordPress creates all tables, but only wp_options is being filled, but ...
1
vote
2answers
512 views

how to refresh wordpress permalink settings? (without admin panel)

I changed permalinks in wp_options table in database and I'm getting 404 on every post. Everything works fine after I log in into the panel and click "save settings" on permalinks options page. How ...
0
votes
1answer
316 views

Order posts alphabetically: how to set order=asc in mysql query?

I have this function: global $wpdb; // adjust the query to fit your needs $posts = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_type = 'post' ...
1
vote
1answer
28 views

For best DB performance should I serialize all theme options together or by type?

If my theme has a lot of options is it better to store all options in one database entry, or to use a databse entry for each group of options? IE would I name all options like this ...
0
votes
1answer
589 views

Query multiple tables at once?

I want to query all of the posts in my WordPress multi-site set-up looking for a certain string. This is only being done in Sequel Pro (on the command line) for my own inquisitive purposes but there ...
0
votes
3answers
2k views

query to create woocommerce products from images

I have hundreds of art images in my WP media library, each of which I want to convert into a woocommerce product, and set as featured image of that product. Rather than manually adding new products ...
0
votes
2answers
45 views

Mixing variables into an array when inserting values

I have a function that inserts a load of values into a database. Not a problem but I have a condition that changes the mysql statement. The problem is is the way wordpress constructs the statement, ...
1
vote
1answer
35 views

Migrating from Existing MySQL Setup to WordPress

I currently have a database with the following schema: Table: Articles Columns: ID, Title, Author, Content Table: Authors Columns: ID, AuthorName, EmailAddress Table: Categories Columns: ID, ...
0
votes
1answer
121 views

SQL Query in WordPress - Getting Impossible WHERE error

I don't get any result in the SQL query below. I am trying to find user_id of users with custom usermeta fields. SELECT DISTINCT user_id FROM wp_usermeta WHERE ( ( ...
0
votes
1answer
572 views

SQL Statement - Mass Delete Custom Post Types

This website lists a nice way of deleting posts based on category http://www.tripwiremagazine.com/2010/06/how-to-effectively-bulk-delete-many-posts-in-wordpress.html The relevant code is: delete ...
-1
votes
1answer
145 views

Location of core code for database connection and get_header

I understand WP well enough to create a custom theme at a basic level, but have no experience with the core code. I've also just finished a book on basic php and mysql coding. I'd like to look 'under ...
0
votes
1answer
171 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 ...
1
vote
1answer
478 views

SQL query to update post_date (one post = one single date & time)

I have 120 posts of one category ready for my wordpress blog. For the moment, posts are drafts and I don't want to schedule them manually. I want to publish them like this: 4 articles each day from ...
0
votes
2answers
145 views

Copyright: Get first and last date of post type

I was searching for the easiest/fastest way to get the accurate date range for copyright notices in the footer. The copyright notice shouldn't only contain the year, but as well take month and day ...
3
votes
2answers
227 views

Search multiple meta keys at once

How would I modify the following SQL Query to allow me to search multiple meta keys at once? e.g. user_business AND user_about In the end I'll be searching about 40 - 50 different meta keys; or if ...
0
votes
0answers
50 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 ...
1
vote
1answer
301 views

MySQL select query with ajax

I am passing variable with ajax to list.php in my twentytwelve template. In list.php I am executing mysql select query but when I see in console I am getting this error: <br /> <b>Fatal ...
-1
votes
1answer
250 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
2answers
250 views

update image path with words starting uppercase to lowercase chars

I have to convert the image path to lowercase characters inside wp_posts table. Right now, I have inside my posts this: <img class="alignleft" title="my image title" alt="my image alt" ...
2
votes
2answers
106 views

Update a Wordpress post or page takes 60+ seconds

Since updating to Wordpress 3.5 I've had my updates of pages and posts become excessively slow. I've been timing them and they take 40-80 seconds to update. I've spent the last 2 hours reading and ...
0
votes
1answer
65 views

WordPress Mysql query and Duplicate

i've a problem with mysql query on my wordpress database. I've custom fields Country and City. At moment I have this query that show all the cities of "UK" Country $querystr = " SELECT wposts.* ...
0
votes
2answers
114 views

$wpdb is queried but results don't show

I am trying to show a list of custom post types on a page template. When I view the page, instead of seeing the different posts, I see the actual page repeated. For example, If I have 5 posts, the ...
0
votes
1answer
72 views

What could cause a WP Option to get truncated?

I have a WP plugin, where all admin setting field values were suddenly changed to the letter 'a'. All settings are stored in one 'big' option in the table. Seemed like the serialization gone wrong. I ...
0
votes
1answer
57 views

How can I manage my multiple wordpress websites from main website?

Can this solution be used for multiple WP installations on the same site? For example, I have multiple blogs (multiple subdirectories), i.e. mysite.com/blog1, mysite.com/blog2, mysite.com/blog3, etc. ...
0
votes
1answer
344 views

wpdb prepare insert table doesn't work

I followed the introduction to use prepare to insert some data to the table. The code is like this: $wpdb->query( $wpdb->prepare( "INSERT INTO ...
0
votes
1answer
52 views

select a single val though a table in wordpress

The table is like this: category_id category_name category_parent_name I would like to get category_id by using category_name. I searched online, and the code is like below: $ad_cat is the ...
1
vote
2answers
289 views

Connect another DB and fetch records from some tables

I want to connect with another wp db & then fetch records from new connected db then close that db. I follow How can I connect to another WP database and use WP_Query? but after connect to new db ...
0
votes
1answer
85 views

MySQL database migration to WordPress

I have a MySQL database established for a web application I have been working on in a non WordPress database. This database has many tables with pre-populated rows for foreign keys etc. which took a ...
1
vote
0answers
319 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 ...
0
votes
1answer
92 views

Ubuntu 12.04, Nginx and MySQL issue with Wordpress Database

Twice I installed a fresh LEMP Ubuntu 12.04 instalation on my server and started to build a wordpress site on my VPS following This tutorial. Now, for the second time, after a while I can't write do ...
0
votes
1answer
61 views

Should I use Wordpress to skin a database website?

I am going to start programming a website which allows users to post adverts for aircraft for sale. (Think autotrader for planes). It will be free to use. There are a few websites that do this already ...
0
votes
1answer
148 views

php include not working in custom page

The Problem I have a db.php file which contains mysql login details. I want it in a separate file like this so it can be linked in several different pages for easier tracing later. This all works ...
2
votes
2answers
606 views

Concurrent / simultaneous MySQL connections

I've been looking for the best WordPress hosting for me and I'm wondering how many MySQL connections at once WordPress requires? I know this is kind of general question but how does it look for you? ...
1
vote
1answer
133 views

Searching With Apostrophe

I'm having trouble with my custom theme's search function. I have a number of posts with apostrophes in the title. For example, McDonald's. However, when I try searching say McDonalds, the post won't ...