Answer the question
In order to leave comments, you need to log in
How to prefix requests?
Good afternoon, I use mysqli for my projects. But I don't understand how to include the prefix when requesting? For example:
$db->query("SELECT*FROM `example` where `one`='two'");
// а запрос на самом деле выполнялся такой:
// SELECT*FROM `pb_example` where `one`='two'
Answer the question
In order to leave comments, you need to log in
Create a class such as MyDatabaseAdapter, make it a descendant of the MySQLI class.
Override the query method by adding a prefix to the query.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question