Ver Mensaje Individual
  #10 (permalink)  
Antiguo 05/12/2007, 23:05
Avatar de SI TAN SOLO TUVIERA
SI TAN SOLO TUVIERA
 
Fecha de Ingreso: marzo-2006
Ubicación: Aburrilandia, US
Mensajes: 652
Antigüedad: 18 años, 1 mes
Puntos: 3
Re: Me bota un error que está como raro...¿¿¿ ???

gracias emiliodeg, voy a probar lo que dices, porque nada que doy con el problema. Es raro, unas veces carga bien, otras veces bota ese error, si bota el error dando F5 ya carga la pagina y no vuelve a molestar.. que dolor de cabeza, que me hace pensar que debe haber una congestion en la BD, o han de haber quedado mal programadas o algo...

Creo que esta la otra parte del codigo que me habia faltado postear.

Cita:
Fatal error: Error on executing INSERT INTO autop10_stat_report SET member_id='44', stock = '1011927396', year = '2007', month = 'December', cnt_week = 1 in /home/content/a/u/t/lapagina/html/details.php on line 140
Donde termina este codigo, es la linea 140 que marca el error.

Código PHP:
/*********************************STATISTICS REPORT*****************************/
    
$stats_week date('W');
    
$stats_month date('F');
    
$stats_year date('Y');
    
$months_array = array('January'=>'01','February'=>'02','March'=>'03','April'=>'04','May'=>'05','June'=>'06','July'=>'07','August'=>'08','September'=>'09','October'=>'10','November'=>'11','December'=>'12');
    
$arrWeeks =  getWeeksInMonth($months_array[$stats_month],$stats_year);
    
$databaseWeek getWeekNumber($arrWeeks,$stats_week);
    
    
$sqlStatReportCheck "SELECT id 
                               FROM "
.$db_prefix."stat_report 
                           WHERE member_id='"
.$member_id."' 
                             AND stock = '"
.$stock."' 
                             AND year = '"
.$stats_year."' 
                             AND month = '"
.$stats_month."'";
    
    
$rsStatReportCheck mysql_query($sqlStatReportCheck)
        or 
trigger_error('Error on executing '.$sqlStatReportCheckE_USER_ERROR);    
    
    if(
mysql_num_rows($rsStatReportCheck)==0)
    {
        
$sqlStatReportStart "INSERT INTO ";
        
$sqlStatReportEnd " ";
        
$cntWeekUpdate "1";
    }
    else
    {
        list(
$statReportID) = @mysql_fetch_row($rsStatReportCheck);
        
$sqlStatReportStart "UPDATE ";


        
$sqlStatReportEnd " WHERE id='".$statReportID."'";
        
$cntWeekUpdate "cnt_week".$databaseWeek." + 1";
    }
    
    
$sqlStatReport $sqlStatReportStart." ".$db_prefix."stat_report SET 
                            member_id='"
.$member_id."',
                            stock = '"
.$stock."',
                            year = '"
.$stats_year."',
                            month = '"
.$stats_month."',
                            cnt_week"
.$databaseWeek." = ".$cntWeekUpdate."
                            "
.$sqlStatReportEnd;
                            
    
    @
mysql_query($sqlStatReport) or 
        
trigger_error('Error on executing '.$sqlStatReportE_USER_ERROR);    

Cualquier ayuda les agradezco, probare lo que dice emiliodeg....

....
...
..

Poniendo como dice emiliodeg ::: foreach((array)$arrayWeeksInMonth AS $weekKey=>$weekValue) ::: me soluciona el primer error que no reconoce el array.. pero aun me sigue botando el segundo...

Cita:

Fatal error: Error on executing INSERT INTO autop10_stat_report SET member_id='51', stock = '195962', year = '2007', month = 'December', cnt_week = 1 in /home/content/a/u/t/url/html/details.php on line 140
Esta loca la BD..
__________________
¿Dónde encontrar carros baratos en USA? En Autopten.

Última edición por SI TAN SOLO TUVIERA; 05/12/2007 a las 23:11