0
votes
1answer
30 views

How do I debug an error that a plugin is causing?

I'm having an issue debugging why the plugin I'm creating keeps displaying the error You need to upgrade your database as soon as possible.... The work I've done so far has been on a remote dev site, ...
3
votes
1answer
56 views

What is the correct way for plugins to create tables with special charset/collation considerations?

I'm using WordPress >=3.8. The default charset/collation values in wp-config.php are define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); // Becomes utf8_general_ci I am in a situation where ...
1
vote
1answer
231 views

Hello dolly type plugin that allows people to add their own

I am making a plugin that shows a random joke on a custom 404 page via shortcode and it is basically near enough the same as the default hello dolly plugin, where the jokes are hardcoded into the ...
1
vote
1answer
118 views

How to create custom tables in WordPress using my own plugin?

I am new in WordPress plugin development. This is my core PHP and HTML code create-table.html <form method="post" action="function.php"> <input type="text" name="table_name"> ...
1
vote
2answers
45 views

How should I store a log for my plugin

I have a plugin that sends data to a server as part of a transition_post_status action. The server sends a response each time. I want to keep a log of these responses (permanently) that I can display ...
0
votes
0answers
46 views

What method should I use to store my plugin data (multi level menus with options on each item)

So the background on my plugin - it generates taxonomy/term filters to give you a filtering system similar to what you'd see on NewEgg where you filter your results by category/manufacturer/other ...
0
votes
1answer
42 views

Save temporary registration data

I am working on a custom signup proces, where user first sign up with their name and email and after that they gonna add their company (a post in post type 'companies'). After they have signed up ...
1
vote
2answers
111 views

The ideal place for storing persistent PHP objects

I'm writing some plugins that do background batch processing, i.e. operations that take longer than 30 seconds. I'm creating objects with the necessary job parameters set like this (this is a hugely ...
-2
votes
1answer
143 views

get_option returning a different value from what's saved

add_action( 'admin_init', 'register_mysettings' ); function register_mysettings() { //register our settings register_setting( 'plugin_options', 'plugin_options', 'plugin_options_validate' ); ...
1
vote
1answer
32 views

Database for development

While building plugins one of my biggest annoyances is that my development machine does not match a real world install. What I mean here is that my databases are lacking. I'll code something thinking ...
0
votes
0answers
36 views

How to add additional field in a table row after creating a table?

I used options for my plugins.But now i have changed to use own table.i created and using things good.Now i would like to add one field that gets value from user and add that much value as field.This ...
0
votes
0answers
112 views

Wordpress plugin tables become corrupt

I have written a plugin that creates and uses 3 database tables. On rare occasion, all 3 database tables become corrupt but no other tables in the database exhibit similar conditions. It is pretty ...
1
vote
2answers
72 views

Optimising a big Wordpress site

I'm looking at optimising a rather large site I've been adding to and adding to. The database has become pretty big (maybe 100,000 posts) and it has started slowing down somewhat and giving me "Mysql ...
1
vote
1answer
1k views

How to create database table, add data, update and delete using wpdb via plugins?

I am just starting out to create plugins with database. I know to create a custom database when activating the plugin. I just want to know whether we can create tables at the front end like adding the ...
0
votes
1answer
388 views

Post data in wp-admin to external database

I am trying to make a private form to submit data into an external database so that I can later pull from the database and display the records on a page. So far I have been trying to create a plugin ...
0
votes
1answer
35 views

Update plugin settings option_name for big plugin update

I am working on a plugin update and have changed the settings option_name and key. I would like that the old options are transferred to the new option_name. The old option name is: plugin_options ...
0
votes
1answer
290 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
48 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 ...
0
votes
1answer
43 views

$wpdb->update Issue

Can anyone see what I have wrong here? $wpdb->update( $table, array( 'lat'=>$paper_lat, 'lon'=>$paper_lon ), array( 'id'=> $result=>id ...
5
votes
1answer
203 views

Using a database view = evil incarnate?

I'm at a point in doing some WordPress plugin development where from what I can tell I either have to create an entirely new plugin or I can create a database view. The client wants some simple logs ...
2
votes
1answer
375 views

Formatting of curly brackets array from WP database to get more readable output

E.g. when I want to edit something in my WP database, I get a headache, literally. Because I see something like this: ...
1
vote
1answer
52 views

Is it possible to create Custom Post plug-in?

I understand that Wordpress allows you to create Custom Post Types with Custom Fields, but is it possible to create a custom Plug-In that creates and maintains its own Custom Post type (outside of ...
0
votes
2answers
39 views

What is the best way to store a few fields?

I'm researching what it would take to develop a custom Wordpress plugin. The plugin is a pretty small one. We just need to persist 2 fields of integer information. It's a pretty basic progress bar ...
2
votes
2answers
208 views

Plugin development with unit tests

One of the things that my plugin does is creates a number of SQL tables as part of a versioning function (that is run under the admin_init hook as I couldn't find a better wordpress way of doing ...
0
votes
1answer
415 views

Get a custom table to an array

How can I take my table I created like this: global $wpdb; //Get all the wordpress database stuff $table_prefix = $wpdb->base_prefix; //Get the global prefix for all sites (on a multisite ...
1
vote
1answer
37 views

How to store an extra (surrogate) ID when creating a post with wp_insert_post?

I am generating posts based on rows from a table on an existing database. If a row in the database gets updated I will have to update the respective post. The proble is that I have to find the post ...
2
votes
2answers
690 views

How to modify post content before writing to database?

Hi~ I'm back again and I'm trying to add another function to the script I was working on a plugin that notify my friends of new post that mentions(@) them. Now I want to change the plain text of my ...
4
votes
1answer
313 views

Writing a plugin that notify my friends of new post that mentions(@) them

For example, I write a new post with content "Today I'm happy, because I finally met the girl that @David told me about bla blah..." Once the post is published, there should be an email notification ...
0
votes
1answer
122 views

Inserting into WP DB

I had initially asked a question based on my code (which has since been removed), I need some help/guidance in creating a plugin. Scenario: I have created a custom post type (CPT), now I need to ...
0
votes
1answer
74 views

Make Database query only when option is updated

Below is a DB query I am using to retrieve values and place them in a WP_List_Table. Values are currently being added by add_option, then those values are converted into a custom database table ...
0
votes
1answer
48 views

Plugin: database creation

Can someone tell me what's wrong with this function? function xattachments_db_install() { global $wpdb; $xattachments_db_version = "1.0"; $table_name = $wpdb->prefix ."xattachments"; ...
0
votes
2answers
369 views

Subscribe to author?

Basically, I want to follow the author by other WordPress users. Whenever an author posts new post subscribed users need to get notification by email. If it's not already there, I can create a plugin ...
0
votes
1answer
330 views

Integrating Custom Database with Wordpress

I Have a Wordpress Site with few users who are my college students They Registered using their RollNumbers/HallTicket Numbers as their usernames in Wordpress site Now I Have Another Database with ...
1
vote
1answer
36 views

Building an email signup form. Where should the information be saved in the DB?

I would like to try build a simple plugin that collects and stores the name and email address of the person who filled in the form. I realize there are probably dozens of plugins out there that do ...
1
vote
1answer
112 views

Using WPDB to output raw XML fails because of wp-blog-header.php

I'm coding a plugin. One particular file of this plugin is supposed to pull data from the plugin's custom DB table, and output it with minimal processing as raw XML. The problem is, to get the WPDB ...
0
votes
1answer
85 views

Adding columns to core tables

I was just wondering if there is a compelling reason to not let a plugin add columns to a core WordPress database table, such as wp_term_taxonomy. I could always create a separate table and join it to ...
1
vote
1answer
84 views

Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?

In WordPress, are there any supported 'script plugins', Classes, and/or a WordPress function that will allow a plugin to use to export/import its own data from the database to a txt/json file? A way ...
0
votes
3answers
78 views

Wordpress : Explain Plugins & Theme string value in database

i have installed wordpress and i i have installed couple of plugins and i have got two themes already came with wordpress. What i am asking about today is : what does the Plugins & Theme string ...
0
votes
1answer
251 views

How to display results from a data table with an encrypted user id?

I'm trying to display a table of results for particular users who have submitted answers to quizzes. The problem is that the mysql database I am working with has a funky value for the user's ID. I'm ...
2
votes
1answer
310 views

How is the data stored in the database?

I have years of experience with PHP and MySQL, but just starting to develop plugins for WordPress and need some help. Currently, I am working on a plugin that will add extra functionality to another ...
2
votes
1answer
3k views

Update Option Stored in Multi-Dimensional Array

I have data in the wp_options table currently stored as a multi-dimensional array (profile_element_order): ...
0
votes
1answer
265 views

Default Plugin Settings Not Writing to Database

I have my plugin setup as such: Main plugin file mouldings.php <?php /* Plugin Name: Moulding Profiles Plugin URI: Description: Creates a 'Moulding Profiles' and 'Idea Gallery' custom post ...
12
votes
1answer
3k views

Should I use custom post types or a custom database tables for plugin development?

I'm fairly new to writing wordpress plugins, but I've jumped in the deep end already and I want to make sure I'm doing it "right" on my upcoming big project. I'm going to be heavily extending ...
0
votes
1answer
391 views

dbdelta failing with error: "WordPress database error Table 'wp_2_myPlugin' already exists

I'm upgrading a plugin and having issues with dbdelta. Here's the original db creation function: global $jal_db_version; $jal_db_version = "0.1"; function jal_install() { global ...
1
vote
3answers
2k views

Help With MySQL to WPDB Query Conversion

I have a problem. I've got a PHP script that tracks individual file downloads, and I'm looking for a way to display that number in individual posts. I've got a half-baked solution- a plain ol' MySQL ...
5
votes
1answer
529 views

How does Wordpress handle MySQL row lock errors?

If there is a WordPress plugin which updates rows in a custom table, but that update encounters a row lock, what happens? E.g. two users simultaneously fire an update on TABLE1, one setting AGE=1 and ...
0
votes
1answer
1k views

Wordpress database error: [Query was empty] - using $wpdb->prepare()

I have edited my question, I'm now getting the error about checking my MySQL settings. I changed the $sql_dvalues variable to an array with the values instead of comma spaced values and now it is ...
0
votes
3answers
5k 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
209 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
5k 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 ...