array tabla

This commit is contained in:
humano 2018-11-10 09:01:33 -05:00
parent 230232f06d
commit 04149ea1df

View File

@ -7227,13 +7227,14 @@ $xajax->registerFunction("multiempresa");
function array_control($form_id,$key,$valor){ function array_control($form_id,$key,$valor){
$resultado = array();
$consulta = "SELECT control FROM form_datos WHERE form_id = '$form_id' AND id_campo = $key AND contenido = '$valor' "; $consulta = "SELECT control FROM form_datos WHERE form_id = '$form_id' AND id_campo = $key AND contenido = '$valor' ";
$link=Conectarse(); $link=Conectarse();
mysqli_set_charset($link, "utf8"); mysqli_set_charset($link, "utf8");
$sql=mysqli_query($link,$consulta); $sql=mysqli_query($link,$consulta);
if (mysqli_num_rows($sql)!='0'){ if (mysqli_num_rows($sql)!='0'){
$cantidad = mysqli_num_rows($sql); $cantidad = mysqli_num_rows($sql);
$resultado = array();
while( $row = mysqli_fetch_array( $sql ) ) { while( $row = mysqli_fetch_array( $sql ) ) {
$resultado[] = $row['control']; $resultado[] = $row['control'];
} }