I'm doing a table in html and php, my problem is that I'm trying to execute a query ( insert
) 'n' number of times, I'm dealing with a for
.
This is my code so far
<?php
for($ca=1; $ca<25; $ca++){
$sqlc="insert into riesgos(no_riesgo,unidad_ad,seleccion_ad,descripcion_a,riesgod,nivel_de_dec,seleccion_c,otro,efectos,impacto_i,ocurrencia_i,controles_p,impacto_f,ocurrencia_f,estrategia,descripcion,no_factor,descripcion_f,clasificacion_f,tipo_f,no_control,descripcion_c,tipo_c,documentado,formalizado,aplica,efectivo) values('C','C','C','C','C','C','C','C','C','C','C','C','C','C','C','','','','','','','','','','','','')";
$res = mysql_query($sqlc,Conectar::con());
}
?>
To make it a little clearer and the functionality of inserting many 'C'
, the C
means that I will combine the cells in my table (this is done), they are 25 combinations , and those that do not have the 'C'
I need to combine them only 5 times .
I hope you can help me!
Greetings.