SELECT command denied to user ''@'localhost' for table
I was engaged in data transfer to the form, before that on other forms the base was used normally (the user is root), well, now this error climbs and the base is not used normally
Request:
$sql='select a.id , b.city_lng, b.city_lat from homeplus.t_city as a, homeplus.t_city_coord as b where a.id =b.city_id and a.city_name_rus="'.$city_name.'"'; $res=mysql_query($sql) or die (mysql_error());
File connectDB.php
function OpenDB(){ //$vDB=mysqli_connect("localhost","root","iq2k47","homeplus_test1"); $vDB=mysqli_connect("localhost","root","","homeplus"); if(!$vDB){ die("Connect error (".mysqli_connect_errno().") ".mysqli_connect_error()); } mysqli_set_charset($vDB, "utf8"); return $vDB; }