How to make mysql insert data automatically

How to make mysql insert data automatically

recently I've been introduced into the database world so I am initiating with MySQL, but the problem comes when I am requested to create a database for an art event where adults and children have different entrance costs but like I'm not working with other applications, I have to do everything with SQL instructions so as this language has not -if- instructions I would like you to guide me how to do to assign automatically the cost of an entrance when I register an adult or a child inside a column called "entrance cost"

recently I've been introduced into the database world so I am initiating with MySQL, but the problem comes when I am requested to create a database for an art event where adults and children have different entrance costs but like I'm not working with other applications, I have to do everything with SQL instructions so as this language has not -if- instructions I would like you to guide me how to do to assign automatically the cost of an entrance when I register an adult or a child inside a column called "entrance cost"

I have thinking to create an entity called "rate" where I place the maximum age with lower cost (for children) and otherwise assign the cost for adults, but I don't know how to make to compare this data when I register an entrance and assign the cost to the user variable "entrance"

I'm really confused with this exercise so I hope you can get it and help me with that.

Thanks in advance.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

How to get the most performance out of Azure Database for MySQL

Jan Engelsberg Program Manager at Microsoft discusses the latest features in Azure Database for MySQL for high performance. He also shares tips around getting the most performance out of Azure Database for MySQL​ by right-sizing your Azure Database MySQL server for your workload​ as well as best practices for accessing your server to avoid network latency and authentication overhead.

Write Web Form Data to MySQL Databases in Minutes

In this MySQL Databases tutorial, you'll learn how to wirte web form data to MySQL Databases. We'll set up a web form and use it to collect data. Then, we'll write that data to a heroku database.

MySQL Database Tutorial for Beginners to Advanced Part 1

Learn about MySQL Database from scratch. Go from zero to hero in MySQL Database with this complete course.