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

learn more… | top users | synonyms

1
vote
0answers
169 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 ...
0
votes
1answer
255 views

SQL Query to Get list of all users along with their blogs

How to query for a list of users along with the blogs in which they are member of in a multi site wordpress installation. For example, I need the results as below user domain abc xyz.com abc ...
0
votes
2answers
120 views

Get post by ASC from custome field DATE picker

i want to custome post by ASC. i have some add some post in bachend one of the field date picker. i want to post by date which i set in date picker field <?php $args = array( ...
0
votes
0answers
88 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
2answers
47 views

Help setting up a sql query

I need to list out specific custom field items that contain an associated custom field entry. For example, the custom fields are named "type" and "food". I would like to list out all of the breakfast ...
0
votes
1answer
23 views

add_blog_option blog ID

In multisite I run add_blog_option and look at the row in mysql wp_options. The record is there but I do not see a field for the blogID. How does the wp_options relate to the specific blog?
0
votes
1answer
960 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 ...
1
vote
1answer
46 views

Wordpress not reflecting changed of the database

my problems started when I moved my website to another folder (from /dev/ to /). I have gone through the whole database in order to change all the hardcoded /dev/ into / but I still notice that ...
0
votes
1answer
69 views

Restore Cforms II Form Presets

I have a client who had to reactivate the cforms II contact forms plugin. It refused and gave the following error: *Fatal error*: Cannot use string offset as an array in ...
0
votes
0answers
150 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 ...
2
votes
1answer
791 views

Can I use MariaDB instead of MySQL in wordpress?

Is it possible to use MariaDB instead of MySQL in Wordpress installation? If possible: how do I do that? Is there any drawback or complexities?
0
votes
1answer
328 views

Unique Post Meta Values

I want to use Unique IDs like YouTube video IDs and WordPress post IDs in a custom field 'youtube_id'. I just created a front-end add post page and want to check if 'youtube_id' used or not used in a ...
0
votes
2answers
51 views

Let users register weight each day and save it in DB

I need a way that lets my users register they're weight (kg) and maybe % of bodyfat and save that information on each user in the DB. Then i need a way to output that number again on the logged in ...
0
votes
1answer
76 views

Get data from 3rd table

I have 3 tables: wp_posts wp_metadata users When I get my query from wp_posts I'm using LEFT JOIN to get the data from the wp_metadata, but how can I get a value from the 3rd table users? ...
0
votes
1answer
62 views

How to stop $wpdb from prepending database name

When I run an UPDATE query using $wpdb, WP prepends the database name associated with the WP installation to whatever is passed in the table name argument. This isn't desirable as my app passes the ...
1
vote
1answer
438 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 ...
0
votes
1answer
57 views

SQL database export-import

I develop websites containing WordPress blogs as well as other PHP pages I design. When I make changes to sites locally on my test server I do a SQL database dump using myPHPAdmin. How can I avoid ...
0
votes
1answer
402 views

Insert two row in wordpress database

Hello I am working on a template where I have to grab some value and insert them in my own created table in wordpress database. Now as I dont know how to insert record in wordpress database , so i am ...
0
votes
0answers
104 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
1answer
738 views

WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]

after wordpress update to 3.5+ i get error in this plugin. I do not understand how to fix it. If anyone can help me with these problem or give me an example of how to fix it here is the full code of ...
1
vote
1answer
137 views

Separate DB by yearly archive of Wordpress

I have large DB of blog post I already export it by year and wanted to make archive by year doing it on subdomain, like 2012.mysite.com I stack looking for solution on internet, I wondering if their ...
0
votes
0answers
255 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
1answer
268 views

after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()

after wordpress update to 3.5+ i get many errors in this plugin. i found that the reason is: http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/ I do not ...
0
votes
1answer
107 views

MySql Query for Wordpress

I need to count the number of value 1 from wp_ul_locked on wp_usermeta i try this code $wpdb->get_var("SELECT COUNT(*) WHERE 'meta_key' LIKE 'wp_ul_locked'"); or $wpdb->get_var("SELECT ...
0
votes
1answer
1k views

Select User by Joining Multiple Meta Value Results

( I would ask this in the general stack exchange forum but I think it is more relevant here. I'm intentionally using direct queries to the database here. ) I'm trying to select a group of users that ...
1
vote
0answers
444 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 ...
0
votes
0answers
70 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
1answer
75 views

Internal error (500) on local & Fatal error on live when trying to access post type edit screen

I'm building a CMS for a company that has 60,000+ static pages which have been converted into posts. 30,000 of these are a particular post type. When I try to access the edit screen in the admin area ...
0
votes
1answer
383 views

How to permanently delete a taxonomy

I want to delete a taxonomy (both form wordpress and database) created long time ago and now no more used. How to do it? I found this function but I think it will delete all my taxonomies... and I ...
0
votes
1answer
83 views

Copy url from post_content to custom field

I'm new to MySQL so I don't know if this is even possible. I would like to copy a url that's in post_content to a custom field. The url is variable and it looks like this: ...
2
votes
1answer
183 views

Ordering Post 2 Post admin meta box by meta from CPT

I've just started using Posts 2 Posts (brilliant plugin by the way) in combination with a custom post type called "Artist" and the WP Event Manager Plugin. My aim is to use P2P to link Artists to ...
0
votes
0answers
34 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
93 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
105 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
42 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
138 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
124 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
191 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
133 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
100 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
617 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
51 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
280 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
178 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
96 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
7k 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
60 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
130 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
596 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
347 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' ...