DataRater Posted August 14, 2008 Share Posted August 14, 2008 I'm using mysql_real_escape_string() to insert data into MySQL as per my last question and I am getting Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'www-data'@'localhost' (using password: NO) in /home/php/Phone.php on line 194 Other queries of the database are working fine. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/119635-mysql_real_escape_string/ Share on other sites More sharing options...
ignace Posted August 14, 2008 Share Posted August 14, 2008 post your code, on what i can see is that you do not have the right to query under username www-data Quote Link to comment https://forums.phpfreaks.com/topic/119635-mysql_real_escape_string/#findComment-616361 Share on other sites More sharing options...
JonnoTheDev Posted August 14, 2008 Share Posted August 14, 2008 Have you included the resource handle in the function? $query = mysql_query("INSERT INTO tableName SET field='".mysql_real_escape_string($string, $resource)."' WHERE ....... Quote Link to comment https://forums.phpfreaks.com/topic/119635-mysql_real_escape_string/#findComment-616362 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.