1
I have auto increment ID and am having error counting columns with this code. How can I enter the ID together?
#SQL Execute
$uir = $pdo->prepare("INSERT INTO visitados VALUES (:IMO_CODIGO, :CATEGORIA, :BAIRRO, :FOTO_PRINCIPAL, :VLR_VENDA, :AREA_TOTAL, :DORMITORIO, :DATA)");
$uir->bindParam(':IMO_CODIGO', $imov);
$uir->bindParam(':CATEGORIA', $cate);
$uir->bindParam(':BAIRRO', $bair);
$uir->bindParam(':FOTO_PRINCIPAL', $foto);
$uir->bindParam(':VLR_VENDA', $vlrv);
$uir->bindParam(':AREA_TOTAL', $area);
$uir->bindParam(':DORMITORIO', $dorm);
$uir->bindParam(':DATA', $adata);
$uir->execute();
Let the bank handle the id od and the rest you can insert in the way the friend proposes.
– Marconi