Query: dbx_escape_string
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
DBX_ESCAPE_STRING(3) 1 DBX_ESCAPE_STRING(3) dbx_escape_string - Escape a string so it can safely be used in an sql-statementSYNOPSISstring dbx_escape_string (object $link_identifier, string $text)DESCRIPTIONEscape the given string so that it can safely be used in an sql-statement.PARAMETERSo $link_identifier - The DBX link object returned by dbx_connect(3) o $text - The string to escape.RETURN VALUESReturns the text, escaped where necessary (such as quotes, backslashes etc). On error, NULL is returned.EXAMPLESExample #1 dbx_escape_string(3) example <?php $link = dbx_connect(DBX_MYSQL, "localhost", "db", "username", "password") or die("Could not connect"); $text = dbx_escape_string($link, "It's quoted and backslashed (\)."); $result = dbx_query($link, "insert into tbl (txt) values ('" . $text . "')"); if ($result == 0) { echo dbx_error($link); } dbx_close($link); ?>SEE ALSOdbx_query(3). PHP Documentation Group DBX_ESCAPE_STRING(3)
Related Man Pages |
---|
fbsql_create_blob(3) - php |
mysql_error(3) - php |
dbx_query(3) - php |
fbsql_read_blob(3) - php |
fbsql_read_clob(3) - php |
Similar Topics in the Unix Linux Community |
---|
Connecting to Oracle Database |
help with header of sql |
help:Reading width separated data |
for statement |
ORA-12154: TNS:could not resolve service name |