30-05-07, 04:22
|
# 9
|
אחראי פורום
|
ציטוט:
נכתב במקור על ידי RS324
לגבי SUP מה שאמרת זה mysql_escape_string
MASTER-T שטויות במיץ.... אתה חייב שיהיה חיבור פעיל למסד
הסיבה :
mysql_real_escape_string מוסיף סלאשים תוך כדי שימוש בקידוד שפעיל בחיבור ל MYSQL
ככה שבשביל להשתמש בה, חייב חיבור.
כל מה שצריך זה לקרוא :
http://il2.php.net/mysql_real_escape_string
קוד:
string mysql_real_escape_string ( string $unescaped_string [, resource $link_identifier] )
Escapes special characters in the unescaped_string, taking into account the current character set of the connection so that it is safe to place it in a mysql_query(). If binary data is to be inserted, this function must be used.
mysql_real_escape_string() calls MySQL's library function mysql_real_escape_string, which prepends backslashes to the following characters: \x00, \n, \r, \, ', " and \x1a.
|
התכוונתי על הפרמטר השני ($link_identifier)
|
|
|