Answers for "javascritp"

PHP
0

javascritp

function Productos(){
    require_once("conexion.php");
    $data = file_get_contents("productos.json");
    $producto = json_decode($data, true);
    foreach($producto as $a){
        $consulta = $conn->prepare("Insert into productos values(?,?,?)");
        $consulta->bindParam(1,$a["codigo"]);
        $consulta->bindParam(2,$a["Nombre"]);
        $consulta->bindParam(3,$a["descripcion"]);
        $consulta->execute();
    }
}
Posted by: Guest on March-16-2021

Browse Popular Code Answers by Language