i am working on PHP on OOP's concept, this is the class called 'connect' which connects to database and also inserts the request in database_
class connect(){
public function insert($column, $value)
{
$insert = mysqli_query($this->con, "INSERT INTO $tablename ($column)
VALUES ('$value')");
}/* end of insert method */
}/* end of class 'connect' */
all i just want to know that if i insert each time by calling 'insert' method for each request, will it be a waste of time or wasting more server time?, or should i just make only one method for inserting all the request at a time?;
$call = new connect("localhost", "root", "", "facebook","fb1");
$call->insert("username", "testInsert141");
$call->insert("username", "testInsert141");
$call->insert("username2", "testInsert142");
$call->insert("username3", "testInsert143");