What is the tutorial about?
Learn about the world of advanced SQL queries, leveraging the power of OpenAI to streamline the process. The tutorial by Crocoblock focuses on using JetEngine 3.2 with Elementor, to generate SQL queries with AI. This is particularly useful for those involved in website design and plugin management, offering a fresh perspective on optimizing WordPress operations.
Tutorial Steps
- Update to JetEngine 3.2:
Ensure you have the JetEngine 3.2 plugin installed on your WordPress site. - Navigate to JetEngine Query Builder:
From your WordPress dashboard, go to JetEngine and select ‘Query Builder’. - Create a New Query:
Click on ‘Add New’ to create a new query. Name your query and select ‘SQL/AI query’ from the ‘Query Type’ dropdown menu. - Enable Advanced/AI Mode:
Scroll down and toggle on the ‘Advanced/AI mode’. - Generate AI-Based Query:
Click on the button next to the ‘SQL Query’ field. In the pop-up window, describe the data you want to retrieve in the top section. Use the tips and prompt examples provided to help you write a good prompt. Once you’re done, click ‘Generate Query’. - Apply the Generated Query:
Copy the generated query or click ‘Use This Query’. Check if it works by toggling on ‘Preview Results’. - Cast Result to Instance of Object:
Scroll down to ‘Cast Result to Instance of Object’ and select the appropriate option (e.g., ‘User’ if you’re querying users). - Save Your Query:
Click ‘Add Query’ to save your query. - Apply Query to Listing:
Open the listing you want to apply the query to with Elementor. Select the ‘Listing Grid’ widget and enable ‘Custom Query’. Select the query you just created. - Adjust the Prompt:
If needed, you can adjust the prompt to suit your specific needs. Simply go back to the ‘Generate AI-Based Query’ step and modify the description in the top section.
Use Cases for this Tutorial
- Birthday Notifications:
Displaying users who have birthdays in the current month, useful for sending out personalized greetings or offers. - Experience Filter:
Showcasing employees with a specific range of experience, beneficial for HR processes or team management. - Custom Queries:
Generating custom queries for any specific need, enhancing the functionality and user experience of your website.