MySQLi works fine inside a class with no namespace and outside a class.
I recently started using namespace and now I have stumbled on a code much like the following:
namespace Project;
class ProjectClass{
public static function ProjectClassFunction{
$db = new mysql(data, data, data, data);
}
}
However, it reports back to me with a message
"Fatal error: Class 'Projectmysqli' not found"
How do I use mysqli inside a class which uses namespace?
See Question&Answers more detail:os