2
For some reason DBA put "ç" in the name of tables in the Mysql database and now I can’t select these tables from php:
$conn = new mysqli($servername, $username, $password, $dbname);
$sql="select * from Tbl_login";
$result = $conn->query($sql);
select the wheel. But the:
$conn = new mysqli($servername, $username, $password, $dbname);
$sql="select * from Tbl_OrdemServiço";
$result = $conn->query($sql);
It does not bring results...but if I run this select in the bank it brings.
Among the various tests I did gave me also this mistake:
You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for the right syntax to use near ' o' at line 1
someone can help me ?
+1 Perhaps you were right, although it may be bad practice, some people do not work with what they create, they work with what they find. And solving a problem is always better than avoiding it (at the moment I have the votes blocked).
– Edilson
@Edilson, there’s a bank you use
[ ]
brackets to escape names with special characters.– rray
I usually prefer not to use any kind of special character, like straight and simple names, are easy to memorize, and easy to handle.
– Edilson