Big SQL problem, you guys got this before?

a complete banner management system, any number of banners can be added
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Big SQL problem, you guys got this before?

Postby Argzors on Tue 08. Feb, 2005 12:47

Randomly, this error message stays up and doesn't dissapear. I've had to remove the banners for the mean time as it's too harmful to the forum... please help!!!

SQL Error : 1030 Got error 28 from table handler

SELECT DISTINCT banner_id, banner_name, banner_spot, banner_description, banner_forum, banner_type, banner_width, banner_height, banner_filter FROM phpbb_banner WHERE banner_active AND IF(banner_level_type,IF(banner_level_type=1,2<=banner_level,IF(banner_level_type=2,2>=banner_level,2<>banner_level)),banner_level=2) AND (banner_timetype=0 OR (( 1046 BETWEEN time_begin AND time_end) AND ((banner_timetype=2 OR (( 2 BETWEEN date_begin AND date_end) AND banner_timetype=4) OR (( 20050208 BETWEEN date_begin AND date_end) AND banner_timetype=6) )))) ORDER BY banner_spot,banner_weigth*SUBSTRING(RAND(),6,2) DESC

Line : 444
File : /home/wwiireen/public_html/forum/includes/page_header.php


I've tried taking the code at and around line 444 out, but then the banners dont show up so thats no good. The code is:

Code: Select all
$sql = "SELECT DISTINCT banner_id, banner_name, banner_spot, banner_description, banner_forum, banner_type, banner_width, banner_height, banner_filter FROM ".BANNERS_TABLE ."
      WHERE banner_active
      AND IF(banner_level_type,IF(banner_level_type=1,".intval($sql_level)."<=banner_level,IF(banner_level_type=2,".intval($sql_level).">=banner_level,".intval($sql_level)."<>banner_level)),banner_level=".intval($sql_level).")
      AND (banner_timetype=0
      OR (( $hour_now BETWEEN time_begin AND time_end) AND ((banner_timetype=2
      OR (( $week_now BETWEEN date_begin AND date_end) AND banner_timetype=4)
      OR (( $date_now BETWEEN date_begin AND date_end) AND banner_timetype=6)
      )))) ORDER BY banner_spot,banner_weigth*SUBSTRING(RAND(),6,2) DESC";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, "Couldn't get banners data", "", __LINE__, __FILE__, $sql);
}
Argzors
Poster
Poster
 
Posts: 3
Joined: Mon 31. Jan, 2005 01:59

Return to Complete banner [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron