Author Topic: hilfe!!!!!DB Error  (Read 17209 times)

0 Members and 1 Guest are viewing this topic.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: hilfe!!!!!DB Error
« Reply #15 on: May 04, 2005, 04:03:39 PM »
Du hast die Änderung wie ich es hier beschrieben habe NICHT gemacht.
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline nova2004de

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: hilfe!!!!!DB Error
« Reply #16 on: May 04, 2005, 04:09:18 PM »

also so ja,der fehler ist immer noch da:

if (defined("GET_CACHES")) {$new_cutoff = time() - (60 * 60 * 24 * $config['new_cutoff']);
  $sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
         FROM ".CATEGORIES_TABLE." c
         LEFT JOIN ".IMAGES_TABLE." i ON (i.cat_id = c.cat_id AND i.image_date >= $new_cutoff AND i.image_active = 1)
         GROUP BY c.cat_id
         ORDER BY ".$config['cat_order']."";
  $result = $site_db->query($sql);

  while ($row = $site_db->fetch_array($result)) {
    $cat_cache[$row['cat_id']] = $row;
    $cat_parent_cache[$row['cat_parent_id']][] = $row['cat_id'];
  }
  $site_db->free_result();

  // --------------------------------------

  $new_cutoff = time() - (60 * 60 * 24 * $config['new_cutoff']);

  $sql = "SELECT cat_id, COUNT(image_id) AS new_images
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1 AND image_date >= $new_cutoff
          GROUP BY cat_id";
  $result = $site_db->query($sql);

Quote

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: hilfe!!!!!DB Error
« Reply #17 on: May 04, 2005, 04:12:46 PM »
Welche Version benutzt Du denn jetzt? 1.7.1 oder noch 1.7?
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline nova2004de

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: hilfe!!!!!DB Error
« Reply #18 on: May 04, 2005, 04:14:16 PM »
1.7.1

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: hilfe!!!!!DB Error
« Reply #19 on: May 04, 2005, 04:15:43 PM »
Der ganze Abschnitt muss so aussehen:

Code: [Select]
if (defined("GET_CACHES")) {
  $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment
          FROM ".CATEGORIES_TABLE."
          ORDER BY cat_order, cat_name ASC";
  $result = $site_db->query($sql);

  while ($row = $site_db->fetch_array($result)) {
    $cat_cache[$row['cat_id']] = $row;
    $cat_parent_cache[$row['cat_parent_id']][] = $row['cat_id'];
  }
  $site_db->free_result();

  // --------------------------------------

  $new_cutoff = time() - (60 * 60 * 24 * $config['new_cutoff']);

  $sql = "SELECT cat_id, COUNT(image_id) AS new_images
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1 AND image_date >= $new_cutoff
          GROUP BY cat_id";
  $result = $site_db->query($sql);

  while ($row = $site_db->fetch_array($result)) {
    $new_image_cache[$row['cat_id']] = $row['new_images'];
  }
  $site_db->free_result();

  // --------------------------------------

  $sql = "SELECT cat_id, COUNT(*) AS num_images
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1
          GROUP BY cat_id";
  $result = $site_db->query($sql);

  while ($row = $site_db->fetch_array($result)) {
    $cat_cache[$row['cat_id']]['num_images'] = $row['num_images'];
  }
  $site_db->free_result();
} //end if GET_CACHES
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline nova2004de

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: hilfe!!!!!DB Error
« Reply #20 on: May 04, 2005, 04:18:34 PM »
 :D :D :D :D
ja alles wider ok,was hate ich den kaput gemacht aber das so ein fehler enstaden ist??