Questions tagged [wordpress-database]
28 questions
3
votes
1 answer
Is it safe to run MySQL transactions with $wpdb in WordPress?
As far as I understand the global $wpdb object utilizes just a single MySQL connection under the hood (by default).
Because the object is global every other plugin/theme/whatever seems to be using this connection.
My question is: Is it safe to use…

fabiancdng
- 45
- 3
2
votes
1 answer
wp_actionscheduler_actions -> #1067 - Invalid default value for 'scheduled_date_gmt'
wp_actionscheduler_actions - when I activated wp mail plugin it shows error message duplicate primary key, WordPress user cant created, WordPress plugin not working properly, WordPress database having two database engine immodb and MyISAM.
after…

Akash Badole
- 51
- 1
- 8
1
vote
2 answers
Access with wordpress query to meta_key is in other meta_key (with cmb2 plugin)
First i tried to create a filter with ( pre_get_posts )
but finally i decided to create a page archive for my custom post (date);
I take the classic loop of archive page Wordpress and had $args
$args = array(
'post_type' => 'date',
…

Bertrand Kaernel
- 21
- 4
1
vote
1 answer
How to use wordpress $wpbd with custom table?
my friends.
I'm creating a custom php page on my wordpress website where I need to read and update a custom table. I'm using $wpdb class but I get no result when I use the table I create (the $result value stays null). With wordpress tables, it…

Saulo M
- 11
- 2
1
vote
1 answer
Complex Transformation & Joins Not Working
I'm getting stumped on a complex MySQL Query. I've tried joins, and I've tried using where X=Y clauses to merge multiple WordPress tables together.
What I am attempting to do is export WordPress users, including specific user meta data merged with…

Kevin Gordon
- 13
- 2
1
vote
2 answers
How to work with serialize array database Wordpress to make CRUD operation?
I have data in the metauser table as shown below. As you can see, the data is in the form of a serialized array. How do I push array data? I want to save the post id in the meta bookmark. But if I use add_user_meta() instead it creates data in a new…

Fauzan Edris
- 136
- 3
- 13
1
vote
1 answer
WordPress save data to DB via AJAX
I'm quite new to WordpPress and web development as in general.
Trying to save data to wordpress DB from the form I have on the page via ajax call.
This is the form I have:

Michael Kashapov
- 23
- 5
0
votes
0 answers
Storing integer value in Wordpress db via javaScript and PHP
I'm running into a problem where I can't find a solution. I have a little game plugin which is written in JavaScript. Now I would like to store the highscore in my wordpress database. Therefore I included a jQuery function in my game which is…

AgataUrsula
- 13
- 2
0
votes
0 answers
How to manually offload wordpress media directory
A blog owner wants to free disk space in his shared hosting. In order to do that, he thinks to offload old media files to another external webserver (...instead of upgrading the hosting plan...). Note that he doesn't need to reuse those media files…

checkm
- 89
- 9
0
votes
0 answers
Generate custom submission ID and download the data in a predesigned pdf template in wordpress
I am trying to make a form that has the following 2 features:
The form has a dropdown menu (eg. with values "Apple", "Orange", and "Grapes"). On submission, the form should be able to generate and pass a submission that is specific to the values…
0
votes
0 answers
restoring database from .frm & .ibd
I have a WordPress site hosted on a Linux server. I need desperate help restoring my database. I managed to salvage the phpmyadmin folder from the server and the following…

fadi
- 1
0
votes
2 answers
Delete column in WordPress database table
I want to delete a column from a table in WordPress.
I tried many ways but either they don't work or they delete the whole row.
But I just want to remove the status column.
I have a lot of tables and I can't delete them manually.
Is there a solution…

alex dev
- 3
- 4
0
votes
1 answer
Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` when setting local WP
So I am in the middle of hosting a live wordpress site locally using XAMPP. The code is in a bitbucket repo and I have been given the database from the staging site to connect my local environment.
After renaming the database with the localhost…

WP_dev
- 3
- 3
0
votes
2 answers
Insert fields into WordPress DB using wpdb->insert and gravity forms
I have been trying to insert some fields from a gravity forms submission into a custom WP database and can't seem to get the fields to populate.
// create a past speaking event
add_action( 'gform_after_submission_8', 'add_past_speaking_event', 10, 2…

Matt Morgan
- 1
- 1
0
votes
1 answer
update multiple values in one column using one sql query?
I am working with huge MySQL database and need to set same two values for one table field.
My table is post3 and set two values 'attachment', 'image/jpeg' for post_type column.
I have tried following queries
UPDATE `post3`
SET post_type = ''
WHERE…

Binod Bhattarai
- 3
- 3