I have the following function :
public function excluir ($idPlano) {
$string1 = "DELETE FROM planos WHERE idPlano = ".$idPlano;
$string2 = "DELETE FROM fotos WHERE idPlano = ".$idPlano;
$this->conexao->query($string1);
$this->conexao->query($string2);
}
I would like to do something like:
public function excluir ($idPlano) {
$string = "DELETE FROM planos WHERE idPlano = ".$idPlano;
$string .= "DELETE FROM fotos WHERE idPlano = ".$idPlano;
return $this->conexao->query($string) ? 1 : 2;
}
Do only 2 searches.
Is it like this?
Kind that a CONCAT ...