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? 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 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 ....... Link to comment https://forums.phpfreaks.com/topic/119635-mysql_real_escape_string/#findComment-616362 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.