I am setting up a CRUD and I want to join fields from different tables, this would be:
- Customers table: customer, first and last name
- Invoice table: ID and quantity
The code of the SELECT would be:
$id = $_GET[ "IdCliente" ];
$nom = $_GET[ "Nombre" ];
$ape = $_GET[ "Apellido" ];
$idfactura = $_GET[ "IdFactura" ];
$consulta = "SELECT Idcliente, nombre, apellido, idfactura.factura
WHERE Idcliente=:idcli, Nombre=:nomcli, Apellido=:apecli, Idfactura=:idfact"
Is this code well written?