MySQL is an open-source, relational database management system.
3
votes
1answer
241 views
WordPress use innodb by default?
I just created a new WordPress site in my server. Normally, WordPress uses MyISAM as the database type. But this time, it created all InnoDB tables! Is this normal? Has WordPress switched to InnoDB in ...
0
votes
1answer
78 views
Drop posts from categories in MySql
Is there a way to remove all posts from all categories?
I found plugin for this, but it's very slow. What I need is MySql query that will help me remove all posts from all categories.
If you know how ...
0
votes
1answer
25 views
Multiple Wordpress Pages
Not sure how to approach this one.
I have a wordpress page that uses a mysql query to grab info from a database based on the page title.
I basically want to replicate that page to 50 or so ...
7
votes
3answers
320 views
What's a good strategy for planning Wordpress DB growth?
Hoping for some feedback on the topic of optimizing and staying on top of performance as a Wordpress database grows... to paint a picture.... let's say you have a wordpress / buddypress MU site that ...
1
vote
1answer
233 views
mysql query from wordpress page using custom table
I want to a mysql query that matches a page title. Not sure of a better way to accomplish this task, but I am stuck.
This is my basic test code.
<?php
$page_title = wp_title('');
echo ...
0
votes
0answers
151 views
How to integrate and connect form functions of legacy contact form scripts that use MySQL and ColdFusion to WordPress? [closed]
I’m creating a new WordPress site(Site A), replacing a static site (Site B). The existing site, (Site B) has 2 contact forms which utilize scripts for their contact forms.
One script uses ColdFusion ...
1
vote
0answers
50 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 ...
0
votes
2answers
53 views
Access Tables with number prefix
I have multiple sites setup within my site. I need to access all the various options tables which are named 'wp_#_options'. How can I select these tables that have a number prefix?
Using
...
1
vote
2answers
134 views
Join new table with SQL query
I created a plugin with a new table (wp_soundcloud) and I need to retrieve the data from that new table along with the post data.
Here is my query:
$querystr = "
SELECT $wpdb->posts.*,
...
-1
votes
4answers
1k views
Manually delete post from database
For whatever reason, I have a post and a page with the same slug name and it causes the db to hang. I can't alter the slug on either so I need to go manually delete the posts from the database and ...
0
votes
3answers
186 views
Migrated to Namecheap, now Trouble with Database & wp-config [closed]
I have been using a free web host while I set up my WP site. Now that it's all done I went and bought hosting from Namecheap.
I uploaded the site and WordPress and everything seems to look fine, but ...
0
votes
0answers
103 views
Making Ajax Web Chat to unlimited users [closed]
I am getting ajax chat script here:
http://tutorialzine.com/2010/10/ajax-web-chat-css-jquery/
The script can only accommodate a maximum of 20 users.
If I want to make an unlimited, what should I do?
...
1
vote
2answers
162 views
Distinction on meta value on pre_get_posts
I've got a special "position" meta field for posts which can be between 0 and 37. 0 Is ignored, and everything else can have obviously any number between and including 1 and 37. But this of course ...
0
votes
1answer
246 views
populate select options from extra mysql table data
hi guys i am trying to populate a select element with options from the data in one of my sql tables heres what i have so far:
<?
$SQL = "SELECT * FROM pt_country ORDER BY name";
$rs = ...
1
vote
1answer
306 views
Use ajax to update_post_meta
2 days ago I asked this then I tried to work on my code to be able to understand how ajax and php work and now I have a new issue that, probably would be easily solved.
These are my codes:
<?php
...
1
vote
0answers
132 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
votes
1answer
154 views
how to search through plugin in wordpress cimy-user-extra-fields?
I have a plugin clalled - Cimy User Extra Fields.
I need to search the content through this plugin. This plugin is in WordPress, and all the content are stored in the database also, like industry, ...
0
votes
0answers
8 views
how to used Cimy_User_Extra_Fields plugin for search? [duplicate]
Possible Duplicate:
how to search through plugin in wordpress cimy-user-extra-fields?
I am using Cimy_User_Extra_Fields plugin in wordpress.In this plugin i just entry INDUSTRY, location ...
1
vote
1answer
144 views
How to split the a table in database?
Is there any option to split the tables in more tables in different databases? The problem is that my the wp_posts table is to big and it takes a lot of time to show in the Dashboards... (more than 20 ...
6
votes
1answer
187 views
dbDelta support for FOREIGN KEY
On PHP 5.3.13/MySQL 5.5.21 the following code doesn't work:
if($check_custom_fields_form!=1){
$sql = "CREATE TABLE IF NOT EXISTS ". $table_custom_fields_form ." (
`form_name` ...
0
votes
1answer
41 views
If the only thing I use MySQL for is Wordpress, do I need MySQL's timezone tables?
The only thing I have MySQL around for is Wordpress. Some MySQL features, I gather, require you to import the system timezone database into special tables in the mysql database. (Which seems like a ...
1
vote
0answers
106 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 ...
2
votes
2answers
326 views
Database slowdown after update to 3.4.1
I own a wordpress installation, and Updated to 3.4.1.
After the upgrade, I got a very strange slowdown to my wordpress.
After all, I used the
define('SAVEQUERIES', true);
in my wp-config.php with ...
2
votes
2answers
524 views
If I consider changing my WordPress DB tables to InnoDB, will it have an effect on the way WordPress works?
I found a superb post here about optimising WordPress for large installs.
One of the steps refers to lighthttpd which sounds excellent but isn't currently supported by DirectAdmin. Last time I messed ...
1
vote
3answers
1k views
Will it break my site if I delete all transient records in wp_options table?
My site currently has an outrageous 500k+ transient records in the wp_options table.
This causes the table to be crashed frequently and so be my site.
I thought transient records will all expired ...
1
vote
1answer
249 views
Query to import data from one MultiSite table to another (pages/sub-pages)
I'm updating a standard install with about 500 (eek!!) pages to a MultiSite for easier sub-site management.
I basically want to take a sub-page and its children from the root site and copy the data ...
0
votes
1answer
171 views
Check against server time to display SQL entries - Radio Station DJ Rotator Plugin
I'm building a WordPress plugin that will create a radio station "On-Air Now" DJ rotator.
Working options panel I've built so far: http://i.stack.imgur.com/SiYde.png
I've based the idea on a PHP ...
1
vote
0answers
116 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
261 views
WPDB is not working when trying to run a custom query [closed]
I'm developing a WordPress plugin, and have no other plugins installed.
The logging function is as simple as
function log($message){
global $wpdb;
$message = $wpdb->escape($message);
...
1
vote
2answers
650 views
Where is the content of widgets stored in mysql table
I have the cPanel access to a website but no wordpress login info. So I wants to change a widget content in the website.
How can I change it through phpmyadmin. Where are that widgets sidebar data ...
0
votes
1answer
86 views
Different sql queries count indicator on the main page
I use w3_total_cache plugin. But i can`t understand what is going on sometimes. I have enabled database caching and debug info at the bottom. Sometimes on the main page 90-96 db queries, sometimes ...
2
votes
3answers
763 views
Retrieve featured image
We are building an Android app based on a Wordpress mysql database. We were able to get most of the information from the datase to display on to the app. Now all we have left is to retrieve the posts ...
1
vote
0answers
39 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
1answer
498 views
Importing Wordpress Posts With Custom Meta Data As CSV Files Through PHPMyAdmin
I have been importing data records as posts with custom meta data directly into Wordpress via the CSV Importer plugin. It works okay, however, there are some issues with it.
Issues:
1) It takes ...
2
votes
1answer
1k views
delete unused postmeta
I love the comment by s_ha_dum : http://wordpress.org/support/topic/sql-query-to-delete-postmeta and havent tried it yet, but Im wondering just how 'clever' this actually is?
Does the unused postmeta ...
1
vote
1answer
325 views
MySQL Query To Select Post By Postmeta
I have two custom post types, type1 and type2. Type2 posts have a postmeta called postID that is the ID number of a post in type1. When showing type1 in single.php I want a mysql query that selects ...
2
votes
2answers
411 views
Fulltext search in posts sorted by relevancy
I'm building a custom search page and what I need is to sort results by relevancy (eg. occurences of a keyword)
Using MySQL docs I've built this query:
SELECT ID
FROM $wpdb->posts
WHERE MATCH ...
2
votes
1answer
378 views
Problems with DBDelta with FOREIGN key?
I have the following sql I am using with dbDelta:
$sql .= "CREATE TABLE " . $location_table . " (
location_id MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
name VARCHAR (100),
...
0
votes
2answers
133 views
Parsing External Table Arguments
I have a client project that has posts assigned to their country of origin.
The client wants to be able to search the posts by continent and or region.
I have a separate table that assigns each ...
3
votes
2answers
451 views
Can i use php sql functions instead of $wpdb?
New to wordpress and was wondering why in Wordpress API do they tell you to use functions such as prepare(),insert(),get_col(),get_row(), query(), etc. when technically i can use the built in PHP sql ...
0
votes
1answer
248 views
SQL query not working in alphabetical post title/content search
I have an ajax request using wp_ajax sending one variable named "q" what I want to do is after the script get's the request to look inside the db and fetch the title and id of the corresponding posts ...
0
votes
2answers
405 views
How to Query Database for posts with certain Taxonomy Term
I want to write a select query to return data on only posts which have are associated with the taxonomy term food-and-beverage
SELECT wp_postmeta . * , wp_posts.post_name
FROM wp_posts, wp_postmeta, ...
7
votes
2answers
3k views
The MySQL alternatives: Do Percona Server and MariaDB work well with WordPress, and do they make WordPress go better?
Lately I've been reading about MariaDB and Percona Server, two strong alternatives to MySQL that have gained popularity since Oracle bought Sun.
As far as I know, both of them could be used with ...
2
votes
1answer
1k views
Get Previous & Next posts by Post ID
How can I go about getting the previous and next posts from outside the loop? Everything I try to do aside from the custom SELECT query (using get_posts or WP_Query) breaks stuff further down the ...
0
votes
1answer
396 views
PHP variables in mysql query
What is the consensus on how to insert variables in a MySQL query using the $wpdb->insert syntax: ($table, array($column=>$value),$format)?
I know this hasn't worked:
...
0
votes
1answer
103 views
get_var is neither a string, integer, or array …?
$vote_count = $wpdb->get_var($wpdb->prepare("SELECT votes FROM wp_mytable WHERE product = %s AND
company = %s", $product, $company));
...
1
vote
1answer
259 views
[Multisite] How to create a blogs category page with Blog-Types Plugin
I'm not a web developer so I don't know how to create an sql query to display information from my database.
Here's what I wanted to do, I want to have a page that will display blog categories. When a ...
0
votes
1answer
237 views
How to query / DB requests?
what is the correct way to query the a Wordpress database, meaning to pull row and column info, and then place it into a corresponding table in the Wordpress admin?
I'm wanting to do a query similar ...
0
votes
1answer
578 views
Wordpress Custom Query: Combining Two Functions
I'm a bit new to php and am having some trouble combining the functionality of two custom queries in Wordpress in order to (1) get pagination to work properly, and (2) sort my posts according to a ...
0
votes
1answer
299 views
Query the links Database
Hi I'm trying to convert from a "example" wp_list_table that displays an array of data on the same page, to a "real life" table the pulls data from the database. I have the code setup to where I just ...