problem description
other official database query methods are
Query::table (User::class)-> selectInstance ("other")-> where (" id", $userid)-> limit (1)-> get ()-> getResult ();
but I find it troublesome. I want to operate other databases in the form of native SQL statements:
$result = Db::query ("insert into user (name, sex,description, age) values ("". $name. "", 1," xxxx ", 99)")-> getResult ();
but Db seems to be a static class. How can I make Db"s database connection point to another library
the environmental background of the problems and what methods you have tried
I have tried to use this
Swoft::getPool ("zj.master")-> getConnection ()
but I can"t find the relevant method. There are too few documents on the official website!
related codes
/ / Please paste the code text below (do not replace the code with pictures)