<commit_before><?php

require_once 'Model.php';
require_once 'require.php';

class Album extends Model
{
    public function __construct()
    {
        parent::__construct('albums');
    }
    
    public function get_last_albums($nb, $type) {
        global $IMG_ROOT; // retrieve IMG_ROOT as global variable
        echo "type is ".$type." and nb is ".$nb;
        /*$sth = $this->db->prepare("SELECT distinct a.idserie, s.titre, a.dateachat, a.idalbum, a.couverture, a.num, a.titre"
               ." FROM albums a, series s "
               ." WHERE a.idserie = s.idserie AND a.perso1 = :type "
               ." ORDER BY a.dateachat desc, s.titre, a.num"
               . " LIMIT 0, :nb");
        $sth->execute(array('type' => $type, 'nb' => $nb));*/
        $sth = $this->db->prepare("SELECT distinct a.idserie, s.titre, a.dateachat, a.idalbum, a.couverture, a.num, a.titre"
               ." FROM albums a, series s "
               ." WHERE a.idserie = s.idserie AND a.perso1 = :type "
               ." ORDER BY a.dateachat desc, s.titre, a.num"
               . " LIMIT 0, :nb");
               echo "coucou";
       $sth->bindParam("nb", $nb, PDO::PARAM_INT);
       $sth->bindParam("type", $type);
       $sth->execute();
      // while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
        //   print_r($row);
           //echo '<li>' . $row['nom'] . '  ' . $row['prenom'] . '</li>';
       //}
       return $sth->fetchAll(PDO::FETCH_ASSOC);
    }
}

?><commit_msg>Remove dummy message in album<commit_after><?php

require_once 'Model.php';
require_once 'require.php';

class Album extends Model
{
    public function __construct()
    {
        parent::__construct('albums');
    }
    
    public function get_last_albums($nb, $type) {
        global $IMG_ROOT; // retrieve IMG_ROOT as global variable
        /*$sth = $this->db->prepare("SELECT distinct a.idserie, s.titre, a.dateachat, a.idalbum, a.couverture, a.num, a.titre"
               ." FROM albums a, series s "
               ." WHERE a.idserie = s.idserie AND a.perso1 = :type "
               ." ORDER BY a.dateachat desc, s.titre, a.num"
               . " LIMIT 0, :nb");
        $sth->execute(array('type' => $type, 'nb' => $nb));*/
        $sth = $this->db->prepare("SELECT distinct a.idserie, s.titre, a.dateachat, a.idalbum, a.couverture, a.num, a.titre"
               ." FROM albums a, series s "
               ." WHERE a.idserie = s.idserie AND a.perso1 = :type "
               ." ORDER BY a.dateachat desc, s.titre, a.num"
               . " LIMIT 0, :nb");
               echo "coucou";
       $sth->bindParam("nb", $nb, PDO::PARAM_INT);
       $sth->bindParam("type", $type);
       $sth->execute();
      // while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
        //   print_r($row);
           //echo '<li>' . $row['nom'] . '  ' . $row['prenom'] . '</li>';
       //}
       return $sth->fetchAll(PDO::FETCH_ASSOC);
    }
}

?>
{'fraction_non_alphanumeric': 0.17814319972593354, 'fraction_numerical': 0.0027406646111682084, 'mean_word_length': 1.9918032786885247, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2706065', 'n_tokens_mistral': 1023, 'n_tokens_neox': 1028, 'n_words': 226}