Query and manage data in a MySQL DatabaseComponent key: mysql
MySQL is a popular relational database system. This component allows you to query a MySQL database.
Instead of generating dynamic queries and sanitizing SQL yourself, you can use generic queries with parameter placeholders using the
You can use the placeholder several times in your query, and provide a list of optional parameters to the action.
For example, you can enter a query that reads
INSERT INTO users (name, email) VALUES (?, ?).
Then, configure the optional parameters input to look like the following,
["myUsername", "myEmail"] or whatever values you like.
Values provided for name and email are sanitized automatically.
If you are dynamically generating SQL queries and do not know how many parameters you will have ahead of time, create a dynamic array of parameters in another step and reference them through the Reference Parameters input.
Create a new MySQL connection and enter the host, port, and database for your MySQL server. The username and password are optional inputs that can be put directly into a MySQL connection.
Returns the results of a MySQL database query | key: query
Output Example Payload