Scriptindex.de

[ Menü ]

Home
News
Scripts
Neuzugänge
Suchen
Bücher
Manuals

[ Inhalt ]

Script eintragen
Tutorial eintragen
Newsletter
Umfragen
Link zu uns
Werbung bei uns
Kontakt
Impressum

[ Statistik ]

Hits gesamt: 5203258
Hits Heute: 1361
max. Hits (10.07.07): 6964
User Online: 32
Scripts: 2828

[ Partner ]

CodeBase
I.S.U.M.
LUG Bayreuth
PEAR NEWS
PHP Classes

[ Facebook ]

[ Eigene Domain? ]

[ Buchtipp ]

Lösungsorientiertes Programmieren mit C++.
Lösungsorientiertes Programmieren mit C++.

Manuals > PHP > dbx_escape_string

dbx_escape_string

(PHP 4 >= 4.3.0)

dbx_escape_string --  Escape a string so it can safely be used in an sql-statement.

Description

string dbx_escape_string ( object link_identifier, string text)

dbx_escape_string() returns the text, escaped where necessary (such as quotes, backslashes etc). It returns NULL on error.

Beispiel 1. dbx_escape_string() 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 also dbx_query().


Copyright 1998 - 2009 by I.S.U.M.