# \#mysql

**URL:** https://community.gravityforms.com/tag/mysql/187.md

[Latest](https://community.gravityforms.com/latest.md) · [Categories](https://community.gravityforms.com/categories.md) · [Tags](https://community.gravityforms.com/tags.md)

---

## [MySQL Query to pull all submissions by entry id](https://community.gravityforms.com/t/mysql-query-to-pull-all-submissions-by-entry-id/19422)

<div class="topic-metadata">

**Author:** [@crucesignati](https://community.gravityforms.com/u/crucesignati)\
**Replies:** 2\
**Last updated:** [June 2, 2025, 8:14pm UTC](https://community.gravityforms.com/t/mysql-query-to-pull-all-submissions-by-entry-id/19422 "2025-06-02T20:14:51Z")

</div>

Attempting to pull all submissions from MySQL by entry\_id (which we use everyday on front end) but confused by multiple ID, entry\_id columns and rows in both in wp\_gf\_entry and wp\_gf\_entry\_meta. I’m clearly no DBA , but…

---

## [Unusual spike in CPU usage by MySQL](https://community.gravityforms.com/t/unusual-spike-in-cpu-usage-by-mysql/17450)

<div class="topic-metadata">

**Author:** [@user5beb5293832577.1](https://community.gravityforms.com/u/user5beb5293832577.1)\
**Replies:** 1\
**Last updated:** [May 13, 2024, 1:36pm UTC](https://community.gravityforms.com/t/unusual-spike-in-cpu-usage-by-mysql/17450 "2024-05-13T13:36:00Z")

</div>

I am reaching out to report a significant issue we are experiencing with Gravity Forms on our WordPress site which is affecting our production environment. We have observed an unusual spike in CPU usage by MySQL, reachin…

---

## [Slow Database Queries in WP Admin](https://community.gravityforms.com/t/slow-database-queries-in-wp-admin/15850)

<div class="topic-metadata">

**Author:** [@nterry](https://community.gravityforms.com/u/nterry)\
**Replies:** 1\
**Last updated:** [September 9, 2023, 9:45am UTC](https://community.gravityforms.com/t/slow-database-queries-in-wp-admin/15850 "2023-09-09T09:45:13Z")

</div>

On every page load in the WordPress admin, there are a few Gravity Forms database queries that are very slow on my website. The Query Monitor plugin shows me that the queries are: GFFormsModel::get\_entry\_meta\_counts() …

---

## [Update to 2.7 Broke my Site](https://community.gravityforms.com/t/update-to-2-7-broke-my-site/14395)

<div class="topic-metadata">

**Author:** [@user5a2abdd7548335.3](https://community.gravityforms.com/u/user5a2abdd7548335.3)\
**Replies:** 5\
**Last updated:** [February 10, 2023, 4:18pm UTC](https://community.gravityforms.com/t/update-to-2-7-broke-my-site/14395 "2023-02-10T16:18:59Z")

</div>

Prior to the update to 2.7, my site was working properly. I utilize a custom function to populate a drop-down menu on a webpage. The webpage calls the function through shortcode. After the update to 2.7 I get the fllowin…

---

## [How to bulk delete entries older than x days using MySQL?](https://community.gravityforms.com/t/how-to-bulk-delete-entries-older-than-x-days-using-mysql/14008)

<div class="topic-metadata">

**Author:** [@michaeledi](https://community.gravityforms.com/u/michaeledi)\
**Replies:** 0\
**Last updated:** [December 5, 2022, 7:20am UTC](https://community.gravityforms.com/t/how-to-bulk-delete-entries-older-than-x-days-using-mysql/14008 "2022-12-05T07:20:10Z")

</div>

I’ve got over 30k entries with massive and long field values that I want to cleanup. Previously I tried the WP-CLI to filter and delete old entries, but stuck at the export step since is still took me decades… It’s been…

---

## [Running calculation after submission using gform\_after\_submission](https://community.gravityforms.com/t/running-calculation-after-submission-using-gform-after-submission/13896)

<div class="topic-metadata">

**Author:** [@user5c06e1fd334963.8](https://community.gravityforms.com/u/user5c06e1fd334963.8)\
**Replies:** 4\
**Last updated:** [November 21, 2022, 7:17pm UTC](https://community.gravityforms.com/t/running-calculation-after-submission-using-gform-after-submission/13896 "2022-11-21T19:17:39Z")

</div>

I will try to keep this as short as I can but there are a lot of moving parts here. I am using Gravity Forms to make a very complex form, the form is about 45 pages long but is broken up into separate forms that pass da…

---

## [Repeated slow queries when loading Gravity Flow inbox page (large dataset)](https://community.gravityforms.com/t/repeated-slow-queries-when-loading-gravity-flow-inbox-page-large-dataset/13882)

<div class="topic-metadata">

**Author:** [@michaeledi](https://community.gravityforms.com/u/michaeledi)\
**Replies:** 1\
**Last updated:** [November 16, 2022, 4:05am UTC](https://community.gravityforms.com/t/repeated-slow-queries-when-loading-gravity-flow-inbox-page-large-dataset/13882 "2022-11-16T04:05:24Z")

</div>

Hi team, I’ve been bothered by the duplicated slow query issue with loading my Gravity Flow inbox page in the frontend. Everytime I load this page, the MySQL CPU usage will spike drastically. Here’s the slow query in th…

---

## [Entry meta (post ID, user ID & e-mail) sometimes returns NULL & not sending email notification](https://community.gravityforms.com/t/entry-meta-post-id-user-id-e-mail-sometimes-returns-null-not-sending-email-notification/13838)

<div class="topic-metadata">

**Author:** [@marianssen](https://community.gravityforms.com/u/marianssen)\
**Replies:** 1\
**Last updated:** [November 10, 2022, 4:13pm UTC](https://community.gravityforms.com/t/entry-meta-post-id-user-id-e-mail-sometimes-returns-null-not-sending-email-notification/13838 "2022-11-10T16:13:00Z")

</div>

Hi everyone, some of my entries return NULL entry meta (post ID, user ID, e-mail) in the gf\_entry table. The data is missing only for a few entries. Missing email also means that Gravity Form cannot send the e-mail not…

---

## [Save custom data to entry meta in MySQL \[RESOLVED\]](https://community.gravityforms.com/t/save-custom-data-to-entry-meta-in-mysql-resolved/13791)

<div class="topic-metadata">

**Author:** [@marianssen](https://community.gravityforms.com/u/marianssen)\
**Replies:** 2\
**Last updated:** [November 3, 2022, 4:28pm UTC](https://community.gravityforms.com/t/save-custom-data-to-entry-meta-in-mysql-resolved/13791 "2022-11-03T16:28:27Z")

</div>

Hi! I have some custom data I’m programatically showing using the GF\_Fields::create function as HTML field on the frontend. However, HTML fields do not get saved inside entry meta in MySQL. What would be the right approa…

---

## [SQL\_CALC\_FOUND\_ROWS deprecated as of MySQL 8.0.17](https://community.gravityforms.com/t/sql-calc-found-rows-deprecated-as-of-mysql-8-0-17/12476)

<div class="topic-metadata">

**Author:** [@user5fc14e9f629b2024](https://community.gravityforms.com/u/user5fc14e9f629b2024)\
**Replies:** 1\
**Last updated:** [April 21, 2022, 7:38pm UTC](https://community.gravityforms.com/t/sql-calc-found-rows-deprecated-as-of-mysql-8-0-17/12476 "2022-04-21T19:38:57Z")

</div>

Noticed that SQL\_CALC\_FOUND\_ROWS is still used in queries to display form entries. Found information about deprecated functionality in dev.mysql.com /doc /refman /8.0/en/information-functions.html Something to consid…

---

## [Reset Entry ID to 1 \[RESOLVED\]](https://community.gravityforms.com/t/reset-entry-id-to-1-resolved/11364)

<div class="topic-metadata">

**Author:** [@simonc](https://community.gravityforms.com/u/simonc)\
**Replies:** 10\
**Last updated:** [December 8, 2021, 1:46pm UTC](https://community.gravityforms.com/t/reset-entry-id-to-1-resolved/11364 "2021-12-08T13:46:40Z")

</div>

(There’s another thread with a similar title, but it’s not relevant.) My entry IDs have gone above 30k and it’s causing problems elsewhere. How can I reset the autoincrement back to 1? Then I won’t have this problem for…

---

## [Trying to copy Gravity Form entries to Mysql Table in wpdb](https://community.gravityforms.com/t/trying-to-copy-gravity-form-entries-to-mysql-table-in-wpdb/11011)

<div class="topic-metadata">

**Author:** [@user5c6b2a4bd82f03.8](https://community.gravityforms.com/u/user5c6b2a4bd82f03.8)\
**Replies:** 5\
**Last updated:** [October 24, 2021, 4:22pm UTC](https://community.gravityforms.com/t/trying-to-copy-gravity-form-entries-to-mysql-table-in-wpdb/11011 "2021-10-24T16:22:48Z")

</div>

I’m trying to copy Gravity Form entries, on each submission a form, to a separate MySql table in the wpdb. Table CWRoles is already set up and I’m using the following php snippet. Any ideas why it isn’t working please? …

---

## [Transmitting data when using Password fields](https://community.gravityforms.com/t/transmitting-data-when-using-password-fields/4594)

<div class="topic-metadata">

**Author:** [@user5aa3fef982d159.2](https://community.gravityforms.com/u/user5aa3fef982d159.2)\
**Replies:** 12\
**Last updated:** [July 1, 2021, 9:33pm UTC](https://community.gravityforms.com/t/transmitting-data-when-using-password-fields/4594 "2021-07-01T21:33:57Z")

</div>

Hi there, I tried to use a form with a password field and connect it with Zapier. Zapier or the other app needs the data the user filled in the Password field in my form. But it seems neither the data that was filled in…

---

## [SQL query takes the infinity time: function get\_custom\_field\_names()](https://community.gravityforms.com/t/sql-query-takes-the-infinity-time-function-get-custom-field-names/9315)

<div class="topic-metadata">

**Author:** [@user60a75a175d8ee408](https://community.gravityforms.com/u/user60a75a175d8ee408)\
**Replies:** 1\
**Last updated:** [May 21, 2021, 3:11pm UTC](https://community.gravityforms.com/t/sql-query-takes-the-infinity-time-function-get-custom-field-names/9315 "2021-05-21T15:11:46Z")

</div>

Hey there, I’m working on supporting one big project and faced with the issue of calling this function get\_custom\_field\_names(). It gathers all custom fields from the database by running this query: $sql = "SELECT DIST…

---

## [SQL Query to Create Pivot View](https://community.gravityforms.com/t/sql-query-to-create-pivot-view/7514)

<div class="topic-metadata">

**Author:** [@trevwilcox](https://community.gravityforms.com/u/trevwilcox)\
**Replies:** 2\
**Last updated:** [January 21, 2021, 8:18am UTC](https://community.gravityforms.com/t/sql-query-to-create-pivot-view/7514 "2021-01-21T08:18:39Z")

</div>

I’ve set up a particular form for which I need to be able to query the responses in the database directly so that these responses can be managed / edited. However, the way that the values are stored in the database is “v…

---

## [Using gform\_after\_submission for pushing entries into SQL Database in wordpress](https://community.gravityforms.com/t/using-gform-after-submission-for-pushing-entries-into-sql-database-in-wordpress/6647)

<div class="topic-metadata">

**Author:** [@danhardy](https://community.gravityforms.com/u/danhardy)\
**Replies:** 3\
**Last updated:** [October 29, 2020, 4:42pm UTC](https://community.gravityforms.com/t/using-gform-after-submission-for-pushing-entries-into-sql-database-in-wordpress/6647 "2020-10-29T16:42:32Z")

</div>

Hi All, I’m looking to use gform\_after\_submission to push data to Custom SQL database within wordpress. I/m new to php and SQL so I’m reading/copying and learning all in one. I found the below code. add\_action("gform…

---

## [Populate GF SELECT field using AJAX / MYSQL working except on form error](https://community.gravityforms.com/t/populate-gf-select-field-using-ajax-mysql-working-except-on-form-error/1902)

<div class="topic-metadata">

**Author:** [@Blu3Hipp0](https://community.gravityforms.com/u/Blu3Hipp0)\
**Replies:** 2\
**Last updated:** [May 21, 2019, 8:22pm UTC](https://community.gravityforms.com/t/populate-gf-select-field-using-ajax-mysql-working-except-on-form-error/1902 "2019-05-21T20:22:08Z")

</div>

Hello. I have a Gravity Form that has a ZIP CODE (single-line text) field and SETTING (dropdown) field. The SETTING field has values manually entered. When a ZIP CODE is entered, and a SETTING is chosen from the dropdow…

---

## [Validate Code Entry vs MySQL DB](https://community.gravityforms.com/t/validate-code-entry-vs-mysql-db/1893)

<div class="topic-metadata">

**Author:** [@StriveCreative](https://community.gravityforms.com/u/StriveCreative)\
**Replies:** 1\
**Last updated:** [May 21, 2019, 11:28am UTC](https://community.gravityforms.com/t/validate-code-entry-vs-mysql-db/1893 "2019-05-21T11:28:01Z")

</div>

Hi guys and gals, Great plugin! Attempting to build a form to help us with a client request. They are running a contest where users will enter a unique code to register for a special event. We want to prevent each co…

---

## [Storing of Gravity Form Entries in Database \[RESOLVED\]](https://community.gravityforms.com/t/storing-of-gravity-form-entries-in-database-resolved/855)

<div class="topic-metadata">

**Author:** [@user5aa6d6f4750680.9](https://community.gravityforms.com/u/user5aa6d6f4750680.9)\
**Replies:** 3\
**Last updated:** [January 23, 2019, 8:11am UTC](https://community.gravityforms.com/t/storing-of-gravity-form-entries-in-database-resolved/855 "2019-01-23T08:11:43Z")

</div>

Hi! Does anyone know where Gravity Forms stores all the entries in the PHP MyAdmin (MySQL) database?
