# Prepared Statement And Connector
+ Using prepared statement via the connector is more efficient than in mysql command-line client because it takes full advantage of the binary protocol
+ Connectors for different programming languages provide their own functions and data structures that allow you to prepare and execute statements.

------------------------------------------------------------
Although you can prepare and execute statements with SQL in the mysql command-line client, you gain the most benefit from prepared statements when you use them via Connectors. Because it takes full advantage of the binary protocol.

Connectors for different programming languages provide their own functions and data structures that allow you to prepare and execute statements. The slide shows you some of the functions that are provided in the C API. The functions shown allow you to:
- Create a container for the prepared statement: `mysql_stmt_init()`
- Prepare a statement by providing a SQL string: `mysql_stmt_prepare()`
- Pass in parameters and a container for the result: `mysql_stmt_bind_param()` and `mysql_stmt_bind_result()`
- Execute the statement: `mysql_stmt_execute()`
- Select the results one row at a time: `mysql_stmt_fetch()`
