Acá subí la imagen http://tinypic.com/r/2elxtva/6
En verde mi último registro. Sin verde la tabla nueva.
Me he dado cuenta que no hay repeticiones impares(en rojo, q son las repeticiones de cada número), parece que recibo todos los registros dobles.... Cuando veo la tabla mysql desde phpmyadmin todo se ve bien.
Los incrementos los hago así:
protected $euno=0;
protected $edos=0;
protected $etres=0;
protected $ecuatro=0;
protected $ecinco=0;
protected $eseis=0;
protected $esiete=0;
protected $eocho=0;
protected $enueve=0;
protected $ediez=0;
protected $eonce=0;
for($i=0; $i<$this->enum_resultados; $i++)
{
$eec = mysql_fetch_array($this->exx);
while($eelementos = each($eec))
{
switch($eelementos["value"])
{
case 1:
$this->euno = $this->euno+1;
break;
case 2:
$this->edos = $this->edos+1;
break;
case 3:
$this->etres = $this->etres+1;
break;
case 4:
$this->ecuatro = $this->ecuatro+1;
break;
case 5:
$this->ecinco = $this->ecinco+1;
break;
case 6:
$this->eseis = $this->eseis+1;
break;
case 7:
$this->esiete = $this->esiete+1;
break;
case 8:
$this->eocho = $this->eocho+1;
break;
case 9:
$this->enueve = $this->enueve+1;
break;
case 10:
$this->ediez = $this->ediez+1;
break;
case 11:
$this->eonce = $this->eonce+1;
break;
}
}
}
Tablas:
public function EtablaNormal()
{
echo "<table>";
echo "<tr>";
foreach ($this->epp as $ok1 => $ov1) {
echo "<td valign='bottom'>";
echo "<table border='1'>";
foreach ($this->eyy as $ok2 => $ov2){
if ($ov1 == $ov2){
echo "<tr>"."<td bgcolor='#FFFF00'>".$ok2."</td>"."</tr>";}}
echo "<tr>"."<td bgcolor='#FF0000'>".$ov1."</td>"."</tr>";
echo "</table>";
echo "</td>";}
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
}
//*****************************************************************
public function EtablaVerde($eun,$edo)
{
foreach ($this->epp as $uk1 => $uv1) {
echo "<td valign='bottom'>";
echo "<table border='1'>";
foreach ($this->eyy as $uk2 => $uv2){
if ($uv1 == $uv2){
echo "<tr>"."<td";
if($uk2 == $eun || $uk2 == $edo){
echo " bgcolor='#00FF00'>".$uk2."</td>"."</tr>";}
else {
echo " bgcolor='#FFFF00'>".$uk2."</td>"."</tr>";
}
} }
echo "<tr>"."<td bgcolor='#FF0000'>".$uv1."</td>"."</tr>";
echo "</table>";
echo "</td>";
}
echo "</tr>";
echo "</table>";
}
}
En verde mi último registro. Sin verde la tabla nueva.
Me he dado cuenta que no hay repeticiones impares(en rojo, q son las repeticiones de cada número), parece que recibo todos los registros dobles.... Cuando veo la tabla mysql desde phpmyadmin todo se ve bien.
Los incrementos los hago así:
protected $euno=0;
protected $edos=0;
protected $etres=0;
protected $ecuatro=0;
protected $ecinco=0;
protected $eseis=0;
protected $esiete=0;
protected $eocho=0;
protected $enueve=0;
protected $ediez=0;
protected $eonce=0;
for($i=0; $i<$this->enum_resultados; $i++)
{
$eec = mysql_fetch_array($this->exx);
while($eelementos = each($eec))
{
switch($eelementos["value"])
{
case 1:
$this->euno = $this->euno+1;
break;
case 2:
$this->edos = $this->edos+1;
break;
case 3:
$this->etres = $this->etres+1;
break;
case 4:
$this->ecuatro = $this->ecuatro+1;
break;
case 5:
$this->ecinco = $this->ecinco+1;
break;
case 6:
$this->eseis = $this->eseis+1;
break;
case 7:
$this->esiete = $this->esiete+1;
break;
case 8:
$this->eocho = $this->eocho+1;
break;
case 9:
$this->enueve = $this->enueve+1;
break;
case 10:
$this->ediez = $this->ediez+1;
break;
case 11:
$this->eonce = $this->eonce+1;
break;
}
}
}
Tablas:
public function EtablaNormal()
{
echo "<table>";
echo "<tr>";
foreach ($this->epp as $ok1 => $ov1) {
echo "<td valign='bottom'>";
echo "<table border='1'>";
foreach ($this->eyy as $ok2 => $ov2){
if ($ov1 == $ov2){
echo "<tr>"."<td bgcolor='#FFFF00'>".$ok2."</td>"."</tr>";}}
echo "<tr>"."<td bgcolor='#FF0000'>".$ov1."</td>"."</tr>";
echo "</table>";
echo "</td>";}
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
echo "<td valign='bottom'> </td>";
}
//*****************************************************************
public function EtablaVerde($eun,$edo)
{
foreach ($this->epp as $uk1 => $uv1) {
echo "<td valign='bottom'>";
echo "<table border='1'>";
foreach ($this->eyy as $uk2 => $uv2){
if ($uv1 == $uv2){
echo "<tr>"."<td";
if($uk2 == $eun || $uk2 == $edo){
echo " bgcolor='#00FF00'>".$uk2."</td>"."</tr>";}
else {
echo " bgcolor='#FFFF00'>".$uk2."</td>"."</tr>";
}
} }
echo "<tr>"."<td bgcolor='#FF0000'>".$uv1."</td>"."</tr>";
echo "</table>";
echo "</td>";
}
echo "</tr>";
echo "</table>";
}
}