Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Paginate dummy question

Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
Smarty Pro

Joined: 16 Jan 2005
Posts: 144
Location: Paris

PostPosted: Sun Jan 30, 2005 6:12 pm    Post subject: Paginate dummy question Reply with quote

The question I have probably is pretty simple, and I apologize for still not understanding.

However, I do not succeed to get the paginate function :

This is my .php code :

$motcle = $_POST['motcle'];
$anmin = $_POST['anmin'];
$anmax = $_POST['anmax'];
$nom_auteur = $_POST['nom_auteur'];
$resume = $_POST['resume'];
$auteur = $_POST['auteur'];
$contrat = $_POST['contrat'];

$connexion = connexion (NOM, PASSE, BASE, SERVEUR);
$query = "SELECT * FROM Actes, Bibliographie
WHERE = idBiblio
AND MotsClef LIKE '%$motcle%'
AND Nom_Auteur LIKE '%$nom_auteur%'
AND Resume LIKE '%$resume%'
AND Auteur LIKE '%$auteur%'
AND Contrat LIKE '%$contrat%'
AND annee BETWEEN $anmin AND $anmax ORDER BY annee
LIMIT ". SmartyPaginate::getCurrentIndex() . ", ". SmartyPaginate::getLimit() ;
$smarty->assign($actes, get_db_results());

the function :

function get_db_results($actes)
$_data = $actes;
return array_slice($_data, SmartyPaginate::getCurrentIndex(), SmartyPaginate::getLimit());

AND the error messages :
[client] PHP Warning: Missing argument 1 for get_db_results() in /var/www/html/smartysite/fonctions.php on line 54, referer: http://localhost/smartysite/recherche.php
[client] PHP Warning: array_slice(): The first argument should be an array in /var/www/html/smartysite/fonctions.php on line 58, referer: http://localhost/smartysite/recherche.php

There must be something very basic that I am missing, could anyone please help ?

Many thanks,

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP