mysql - PHP SQL statement escaping -
I wanted to show each user where they said using this statement:
$ Result = Mysql_query ("Select CallerNumber", `CalleeNumber`,` call 'from `servicecast`, where' customer_id` = $ current_using ['customer id']"); < Code> $ current_user ['customerID'] is causing the error of part I tried to keep it with a quotation mark / migration, but this does not work. How can this be done?
It's been awhile since I did PHP, but I think what you want is this:
/ P> mysql_query ("select callerNumber", "calleeumber", `call service ',` call_ar`,' customer_id '=' ". Mysql_real_escape_string ($ current_user ['customer id'] ). "'"); (I'm just looking at mysql_real_escape_string , it is apologetic if it is not commonly used.) In addition, Avoid is done with a backslash (\), not a forward slash (/)
Comments
Post a Comment