Buscamos en 'categorias' mysql_free_result($this_cntcat_sql_rs); $this_cat_sql_query = "SELECT * FROM categorias WHERE visible=1 AND id_web=". intval($this_web_sql_row_rs['id']) ." AND url<>'' AND url='" . $file . "' ORDER BY id DESC"; $this_cat_sql_rs = mysql_query($this_cat_sql_query, $mysql_connect); $this_cat_sql_row_rs = mysql_fetch_assoc($this_cat_sql_rs); $this_cat_sql_totalrows_rs = mysql_num_rows($this_cat_sql_rs); if ($this_cat_sql_totalrows_rs >= 1) { // Se encontró categoria $is_cat = true; $this_cat = intval($this_cat_sql_row_rs['id']); } else { // No se encontró categoria -> Abrimos homepage $is_home = true; } } else { // Se encuentra en 'contenidos' $is_post = true; $this_cat = intval($this_cntcat_sql_row_rs['id_cat']); } } } ?>