I've got a doubt with instances in PHP. I've created one class that basically sends queries to a database. The question is that it's correct to create an instance everytime I want to execute a query or just use the same instance overriding the memory allocated to that class. For example:
//Select
$conversation = new mQuery();
$conversation->operation = "select";
$conversation->data = array("bla", "bla", "bla");
$result = $conversation->execute();
//Update
$conversation = new mQuery();
$conversation->operation = "update";
$conversation->data = array("bla", "bla", "bla");
$result = $conversation->execute();
VERSUS
//Create instance ONCE
$conversation = new mQuery();
//Select
$conversation->operation = "select";
$conversation->data = array("bla", "bla", "bla");
$result = $conversation->execute();
//Update
$conversation->operation = "update";
$conversation->data = array("bla", "bla", "bla");
$result = $conversation->execute();
Thanks in advance.