GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
mysql_real_escape_string(3) MariaDB Connector/C mysql_real_escape_string(3)

mysql_real_escape_string - escape string by taking into account character set of connection


#include <mysql.h>
unsigned long mysql_real_escape_string(MYSQL * mysql,
                                       char * to,
                                       const char * from,
                                       unsigned long);

    

This function is used to create a legal SQL string that you can use in an SQL statement. The given string is encoded to an escaped SQL string, taking into account the current character set of the connection.

mysql - a mysql handle, which was previously allocated by mysql_init(3) and connected by mysql_real_connect(3).
to - buffer for the encoded string. The size of this buffer must be length * 2 + 1 bytes: in worst case every character of the from string needs to be escaped. Additionally a trailing 0 character will be appended.
from - a string which will be encoded by mysql_real_escape_string().
long - the length of the from string.

Returns the length of the encoded (to) string.

mysql_escape_string(3)
mysql_hex_string(3)
Version 3.2.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.