Forum Moderators: coopster

Message Too Old, No Replies

mysqli_query and mysqli_real_escape_string

         

canglan

1:16 pm on Sep 1, 2005 (gmt 0)

10+ Year Member



Hi folks,

Recently I've come across a web page where, in the very last conclusion part, it says MySQLi statements are "pre-escaped", meaning that there is no need for you to do mysql_real_escape_string on any of the variables.

I wonder if this is true? If it's true then what's the purpose of the mysqli_real_escape_string function?

[edited by: coopster at 7:29 pm (utc) on Sep. 6, 2005]
[edit reason] removed url per TOS [webmasterworld.com] [/edit]

coopster

7:32 pm on Sep 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, canglan.

I've not yet used the MySQL Improved Extension but that statement seems directly contradictory to the manual pages. Have a close look at the examples, without escaping the string the query will fail
[php.net...]