Author Topic: - delete -  (Read 4684 times)

0 Members and 1 Guest are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
- delete -
« on: August 02, 2011, 11:15:15 PM »
- delete -
« Last Edit: November 04, 2015, 09:45:06 PM by Sumale.my »

Rembrandt

  • Guest
Re: Externe News innerhalb von 4images anzeigen (header.html)
« Reply #1 on: August 03, 2011, 07:01:30 AM »
*puh*

versuchs mal so:
  $sql "SELECT c.content_id, c.content_title, c.content_cat, c.content_status, c.content_option, c.content_expire, c.content_time  
          FROM pk__content c
          LEFT JOIN pk__contentcat y ON (y.contentcat_id = c.content_cat)
          WHERE c.content_option = 1 AND
              c.content_status = 1 AND 
             (c.content_expire > '"
.time()."' OR c.content_expire='0') AND 
              c.content_time < '"
.time()."'
          ORDER by c.content_time DESC 
          LIMIT 11"
;
  
$result $site_db->query($sql);
  
  
$header_dl="";
  while (
$row $site_db->fetch_array($result)){
  
    
$title $row['content_title'];
    
$title_cutted=TextAbschneiden($title30);
    
$header_dl.="&raquo; <a href=\"include.php?path=article&amp;contentid= ".$row['content_id']."\" onmouseover=\"Tip('$title')\" onmouseout=\"UnTip()\">$title_cutted</a><br />";
  }


die restriction: "pk__contentcat.contentcat_rights" habe ich mal weg gelassen weil ich denke die wird so nicht funtionieren, und das mit ".time()." , bist du dir da sicher das in ".pkTIME." der aktuelle zeitstempel drinnen steht?

hm.. ob du den left join überhaupt benötigst... b.z.w. auch die "zeit" in der WHERE abfrage...
wenn nicht kannst du es ja mal so versuchen:

    $sql 
"SELECT content_id, content_title, content_status, content_option, content_time 
          FROM pk__content
          WHERE content_option = 1 AND content_status = 1
          ORDER by content_time DESC 
          LIMIT 11"
;
  
$result $site_db->query($sql);
« Last Edit: August 03, 2011, 07:14:18 AM by Rembrandt »