It seems like new trends finally and irrevocably get to our favorite CMS – and WordPress without AI feels a bit incomplete. That’s why we introduce our first ChatGPT integration to help you deal with SQL queries. It’s not a separate WordPress AI plugin or module but a tool for advanced users in JetEngine 3.2 Beta release, and you are very welcome to test it.
SQL Query AI Generation: Who Is This Tool For?
JetEngine Query Builder and SQL queries
First of all, I hope you enjoy JetEngine Query Builder, which offers great flexibility when working with dynamic content in WordPress. Using its functionality, you can create really complex queries in an entirely visual and user-friendly interface (so you don’t need to know how to code) to pull exactly what you need from your database to display it on the front end. I’m talking about selecting particular post types in a particular order that belong to certain taxonomy terms, created by authors you want, etc. On top of that, you can use conditional selections and much more.
Without a shred of doubt, Query Builder is a very powerful tool.
It has a list of sources or Query Types you can choose from:
And one of them is called SQL Query. It means that you can write a custom query and display whatever you want directly from your WordPress database on the front end. This is really a unique tool JetEngine offers you.
How to use SQL Query AI Generator?
First, go to JetEngine > Query Builder and choose the SQL query as a query type. Then, activate the Advanced/AI mode toggle (in the JetEngine 3.2 Beta release, it’s at the top of the list, while before, it was more at the bottom). Click the “magic wand” icon and write your prompt. Be as clear as you can and give the names of your meta fields or post/taxonomy types. Use the correct WordPress- and SQL-specific words as much as possible.
There are some sample prompts to give you an idea of how to write them. On click, they will appear in the prompt window.
After you receive the result generated through AI integration, check if it is correct and supposed to work.
Which Crocoblock users can use AI SQL Query Generator in the Query Builder?
For now, this option is not for everyone. Here are some limitations of the Crocoblock site:
- It’s only available for sites that use Master Keys (not those that work on the subkeys);
- As of now, 30 queries per month are available for Lifetime users and five for all the rest.
When to use SQL query type in JetEngine?
Use SQL query type by the JetEngine Query Builder if post/term or other query type options that already exist is not enough for you. Because a Query Builder SQL query type is something added to other query types in the Builder to give all the freedom for the advanced users who know how to work with SQL queries and get the results they need.
If there is a way to use a traditional way of creating a query, just by clicking all the tabs in the Query Builder and selecting the options you need, use it, and it will be more clear to edit, especially considering that there are so many of those options.
What to consider when using this conversational AI integration?
The key here is it is just a conversational AI, and, after all, you are the smartest one here 😎. Don’t forget that AI doesn’t have knowledge about your website structure, IDs, meta field names, etc. So be as specific as possible and give all the details you can to create a good prompt. Name your meta fields in the prompt, so the AI will use them in the result.
But that’s not all; the main thing here is being able to make good use of SQL queries because if you do, there are no limitations for you in using dynamic content. AI is good enough to just generate something quite general according to your prompt, but you should be able to understand SQL syntax and correct inaccuracies it has made.
The Bottom Line
AI plugins for WordPress and CMS AI integrations, in general, earn growing popularity, and they are really the tools to save you a lot of time. But the key thing here is your knowledge and expertise, as well as your understanding of the structure and goals of your website.
What are the tools you want JetEngine to have the AI integration to make your life better? If you have ideas, feel free to write them in the GitHub Repository, and don’t forget to subscribe to our newsletters to get all the updates about recent releases.