WordPress stores user generated content, along with other configurable information, in a a database (typically MySQL).

learn more… | top users | synonyms

0
votes
2answers
865 views

Add some fileds to the wp_posts table

I need to extend some wp tables (wp_posts, wp_comments, wp_users) to store some additional fields. I can't use metadata because I need to query those values directly via MySQL. I need an help to ...
0
votes
1answer
133 views

Array: What is this value based on?

I need to do an import of an array of checkboxes, but there is a value that I don't how it is determined. The array is based on a user meta option that I created that shows a list of category ...
1
vote
4answers
729 views

Retrieving a Value from a wp-database

why my sql statement is not returning any value.. is this wrong? <?php global $wpdb; $result = $wpdb->get_results($wpdb->prepare("SELECT * FROM ...
0
votes
3answers
15k views

wpdb->prepare and mysql UPDATE - how is it done?

Trying to set a 'removed' date time in a plugin query but I'm not sure how to use UPDATE SET with $wpdb->prepare. Here's my query: $cur_date = date('Y-m-d G:i:s'); $rows_affected = ...
1
vote
1answer
3k views

store simple data in get_option()

I am trying to store simple data, a few links inside wp_options. Basically using the following way: update_option( 'simple_links', '<a href="">link 1</a>' ); my question is if it is ...
0
votes
3answers
879 views

Custom Database Table and foreach

I have just created a custom database table and would now like to output every inserted row from it into a predefined format using a foreach statement. Some guidance in this matter would be great. ...
1
vote
1answer
193 views

Adding Custom Forms

I'm looking to create a page for a wedding site that will have a form. The idea is that it is an RSVP page where a visitor will input a unique string that was on the invitation that they received and ...
2
votes
1answer
365 views

Is there a naming convention for database tables created by a plugin?

I have setup my plugin's table to use $wpdb->prefix but aside from that are there any conventions that you should name them; Maybe $wpdb->prefix.'plugin_'.$tablename or something. I can't find ...
0
votes
2answers
6k views

Create New Admin Menu Section - Like how custom post type works, in a way

I've been working with Wordpress off and on for years now, but I haven't gotten entirely immersed with the framework. I have no problem creating plugins that use custom post types, but I'm looking to ...
1
vote
1answer
166 views

Display SQL that wordpress is running

I am wanting to see the actual SQL that worpress is running to build certain pages, is there a debug method or some other way to outpout this or view it?
-1
votes
2answers
74 views

Updating WordPress [closed]

I have just update my WordPress page and I can't see it. A lot of plugins are giving errors, so I activate DEBUG. Then I have try to desactivate all plugins in the database. To make this I erase the ...
2
votes
1answer
421 views

How to create Sub Sub domain Multi User blogs?

Hi to all I would like to create a big Wordpress network with this structure: sitename.com (Main website) cat1.sitename.com (sub website) cat11.cat1.sitename.com (sub-sub website) ...
0
votes
1answer
80 views

Creating fields in the database

I am newbie to wordpress plugin and this is my first plugin which I am doing now. I want that when the plugin will be activate it will make some predefined fields in the database and also the same ...
0
votes
2answers
48 views

What can I do when an outside party hacks into my weblog and changes my display name?

Last night I wrote a mildly controversial blog post about religion on my weblog, and this morning I woke up to find that my display name had been changed to the name of a fanatic religious leader. The ...
0
votes
2answers
1k views

export individual posts to text files or a single csv file

I'd like to export my blog posts to plain text files so I can version control and update them using emacs org-mode via the org2blog package. However, I'm unfamiliar with SQL and the wordpress ...
0
votes
1answer
2k views

Displaying table data on a page

I would like to present content from a table located in Wordpress data base to a Wordpress page. Is there any plugin that i can use.If not,what is the simplest way to code it? Thanks, Ron
0
votes
1answer
272 views

Creating Tables on Network Activation

I'm working on a plugin which creates a new table. I've got it working fine on a single site install, but I'm not so sure about multisite. How do I create a table for each blog on network ...
6
votes
2answers
1k views

Using transients in conjunction with memcached

I was hoping someone could clear the air for me when it comes to using transients with memcached. When running a plugin like w3-total-cache, are there any actual performance advantages to using ...
2
votes
1answer
7k views

Connect forms in WP to external database

I want to use Wordpress for an existing site (coded in PHP). It has some forms (for member subscription, user can update their data etc.) which are connected directly to an existing database. I don't ...
0
votes
2answers
6k views

Does WordPress MultiSite use separate MySql databases?

I ask because I cannot find the options from a plug-in I created on my second blog. Adding this plug-in to the main site and the options show up. I am confused because there is a column in ...
0
votes
1answer
1k views

AJAX wp-mysql running too slow

I have made a function of ajax, which returns all the posts starting with a particular alphabet, suppose a user clicks on letter A, then all the posts starting with letter A will be displayed, any how ...
0
votes
2answers
639 views

Allow users to enter and edit data in one-to-many configuration

We would want a user to login and be presented with a form that they would potentially have to submit multiple times (disclosures of any industry relationships, one form per disclosure). The ...
3
votes
1answer
4k views

how do I determine which image is the featured image in the database

I've queried all children of the post, and two records are shown. This is ok because there are 2 images in the gallery, but I can see no field in the database which makes it clear which one is the ...
0
votes
1answer
231 views

Is there a function to get post info for any publish_status by post ID?

I'm trying to, essentially, check whether a post exists and if it does (in published, draft or auto-draft states) return the post info. I'm finding get_post() doesn't seem to work with drafts, and ...
2
votes
2answers
544 views

What's the most efficient database method to add and query usermeta?

What's the most efficient way - concerning the database - to add and query extra usermeta fields to a profile? I need to add four additional fields of numeric and text data to a user profile and then ...
0
votes
1answer
196 views

How do you make relational post types in Wordpress? [duplicate]

Possible Duplicate: Linking Two Post Types I have a post type, referred to as "Press Release" and another called "People". I need to be able to connect the two together. MY end goal is to ...
0
votes
1answer
240 views

How to edit a published post?

I'm writing a plugin. Can anyone please show me how to edit the content of a published post? I've tried using this: function edit( $post_ID ) { $content = "Hello. This is a test."; $post_info = ...
11
votes
2answers
4k 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 ...
0
votes
2answers
470 views

Efficiency of wp_options vs a new table

I'm building a WordPress theme framework, that will likely have many options as development progresses. I found a related question: When is it appropriate to create a new table in the WordPress ...
0
votes
3answers
577 views

muliple wordpress installs (network) on different databases

I've installed a network for the main domain and the sub.domain.com It works, but I do prefer to maintain in separate databases, how do I do this? Thanks
5
votes
1answer
303 views

When is it appropriate to create a new table in the WordPress database?

For a client we'll need 29,000 terms (all the highschool's in the US) and each term needs 6 meta items (address, phone...). My initial thought was to store the term meta information as suggested in ...
1
vote
2answers
290 views

Help running a MySQL query to update all wp_#_options tables in a Multisite install

I'd like to run a query through my WordPress database that updates the blog_public values on all individual sites. I'm stuck on how to have the statement look for wp_2_options, wp_3_options, etc. I ...
0
votes
1answer
650 views

How to display content from external db with relevant urls

I am working on a website that needs to display information about electronic resources which is stored in an external database. This information will be presented three different ways (alphabetical ...
0
votes
3answers
649 views

change the year on all of my custom post types?

I need to change the published year on all of a custom post type from 2010, to 2011. What is the quickest way to do it? I have 200 entries, so manual would take hours!!
1
vote
1answer
638 views

Share DB tables between two blogs on the same WP Multisite installation

Is it possible for two separate blogs running on the same multisite installation to share tables in the database? By default, Wordpress adds the blog ID to the table prefix for all of the associated ...
0
votes
3answers
463 views

Using the same database on another Subdomain

Hi i am currently replacing my blog run on wordpress with another neat theme. I tried the preview template feature and everything is fine, just that i don't trust everything so easily when it comes ...
0
votes
2answers
355 views

Moving an entire wordpress site from one domain to a new domain and database

I have done all the steps requiered to import the dump.sql file to new database, and copiey the entire content from the old domain over to the new one. When i login to mydomain/wp-admin, i'm ...
1
vote
1answer
446 views

WordPress 'comment counts' got messed up, because of a plugin - DISQUS

I use wordpress and disqus plugin, when user add comment, after few minute, disqus agent will update wordpress database (wp_posts,wp_comments …etc),but when administrator delete comment, disqus will ...
6
votes
3answers
7k views

DB connection error after copying a WordPress Multisite instance to a second location

Here's my setup. I have a Multisite instance running at http://example.com, and I want to do development and staging. Moving an existing Multisite instance of WP onto localhost is a nightmare, so I'm ...
1
vote
2answers
2k views

“Error establishing a database connection” - Intermittent error on GoDaddy

After transferring a working WordPress site to GoDaddy hosting, we've begun getting "Error establishing a database connection" errors on all pages- first intermittently, and now consistently. It's ...
0
votes
2answers
227 views

Need help fixing sql syntax error after WP 3.2 upgrade

I'm using a plugin that failed after upgrade to wp3.2. The error log shows: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ...
0
votes
1answer
631 views

Getting WordPress to work inside a rails 3 application

I am migrating an existing WordPress blog into a subdirectory of a new rails 3 app (deployed on Apache2 / Ubuntu 10). I have PHP/MySQL installed, and I have a standard rails app folder structure in ...
6
votes
2answers
352 views

Does wpdb add considerable overhead on queries with large result sets?

I am working on backup-related plugin and from some research of existing plugins - they seem to favor using PHP's mysql_* functions, rather than $wpdb. Is $wpdb overhead considerable enough that it ...
2
votes
2answers
124 views

The revisions table in my database is at 70% capacity and growing. What should I do?

I installed the Wordpress System Health Plugin and it says that the revisions table in my database is at 70% capacity with 994 rows. I don't fully understand what this means. I anticipate that my ...
2
votes
2answers
216 views

How to diagnose and keep in check encoding issues?

What we have for a project is: multiple sites (production, test, local development); migrated by multiple methods (PHPMyAdmin, Navicat, BackupBuddy); And the issue we are having is that while ...
1
vote
2answers
145 views

All text disappeared (seems to be a database problem)

I have an issue with text in my posts. The site is http://2buntu.com. As I don't own the server, I cannot get direct access to some things. I don't know what caused it but I think it was a plugin I ...
4
votes
1answer
293 views

What is the most secure way to store post meta data in WP?

Sony's recent security "holes" showed how unsafe it can be to store data unencrypted. As some of you may know, I 'm working on re-releasing the free CRM theme Driftwood. What is the most secure way ...
0
votes
1answer
908 views

Switching database on the fly

I have read here about switching the current wp database on the fly using $wpdb->select('database_name'); Once done, I understand that i will have to issue the same statement to the original ...
1
vote
1answer
2k views

Insert post in another database

I have developed a custom script that uses wp_insert_post to create new posts, however i'd like to use similar code to create the same data in another wp database. Could be this done on the fly before ...
6
votes
2answers
791 views

Custom Post Types, or completely custom?

I'm currently in the process of redeveloping my website. I've decided to use WordPress as its CMS, rather than coding everything from scratch. It's a fishkeeping website, consisting of species ...