HILFE... Habe ein riesen Problem...
Ich habe ein PHP-Program das mir die Artikel in der mySQL zusammenzäht und mir diesen wert auswirft... nun ist es so, das ein Artikel abgezogen werden muß... Also statt z.B. 3 Artikel, muß das nur 2 Artikel stehen... Kenne mich leider in PHP nicht aus... Kannst du mir helden wie ich das machen kann?
hier das PHP-Prg.
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap: */
// $Id$
define('CPO', true);
if (file_exists("../_cfg/const.php")) require("../_cfg/const.php");
else require("../_cfg/const.php.dist");
require(CPO_BASEDIR."_include/category_rubric.inc.php");
require(CPO_BASEDIR."_include/var_category.php");
$Artikel_header = $Rubric_header;
require(CPO_BASEDIR."_include/secure.php");
$jetzt = time();
// if this is a personalized rubric, set the string that only fetches
// articles corresponding to the group of the logged in user
if ( $Rubric_secure == 1 ) {
if ( $_SESSION['SID_Group'] != '' ) {
$auth_string = "auth = '' OR auth LIKE '%".$_SESSION['SID_Group']."%'";
} else {
$auth_string = "auth = ''";
}
} else {
$auth_string = "1";
}
if ( $System_release == 1 ) {
$query_count = "SELECT COUNT(*) FROM ".$dbPrefix."_news "
."WHERE artikel_archiv < 2 AND freigabe = 0 AND pub_datum < '".$jetzt."' AND verfallsdatum > '".$jetzt
."' AND kategorie = '".$directory."' AND ( ".$auth_string." )";
} else {
$query_count = "SELECT COUNT(*) FROM ".$dbPrefix."_news "
."WHERE artikel_archiv < 1 AND freigabe != 2 AND pub_datum < '".$jetzt."' AND verfallsdatum > '".$jetzt
."' AND kategorie = '".$directory."' AND ( ".$auth_string." )";
}
$db = new DB;
$db->query($query_count);
$db->next_record();
$max_anzahl = $db->v('COUNT(*)');
echo $max_anzahl;
?>
ConPressoPlus 4.1.6 Version 4.0c "Wild Horses" als BETA-Version 3 verfügbar (PHP 8.3) »»
9. April 2024 - PHP 8.3, Bugfixes, nützliche Modifikationen und zahlreiche Module... letzte Runde der Fehlersuche!
9. April 2024 - PHP 8.3, Bugfixes, nützliche Modifikationen und zahlreiche Module... letzte Runde der Fehlersuche!
Problem mit einen PHP-Prg... HILFE....
-
- ConPresso-Newbie
- Beiträge: 18
- Registriert: 01.01.1970 01:00
-
- Handbuchversteher
- Beiträge: 7369
- Registriert: 01.01.1970 01:00
- Hat sich bedankt: 112 Mal
- Danksagung erhalten: 936 Mal
Ändere die letzte Zeile in
Code: Alles auswählen
echo ($max_anzahl - 1);
Ciao Markus
ConPresso-Module
Kein Support per PN!!! Für Fragen und Diskussionen ist das Forum da!
Succi recentis officinalis
Hochwertige Kräutersäfte und -Öle
ConPresso-Module
Kein Support per PN!!! Für Fragen und Diskussionen ist das Forum da!
Succi recentis officinalis
Hochwertige Kräutersäfte und -Öle
-
- ConPresso-Newbie
- Beiträge: 18
- Registriert: 01.01.1970 01:00