Jump to content
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Articles, afficher un nombre défini d'articles par

Featured Replies

Salut à tous !

J'ai un petit problème de conception de module :

Je veux lister tout ce qu'il y a dans une table "ARTICLES" mais en affichant seulement 20 articles par pages.

J'aimerais faire une fonction qui affiche 20 articles, mais je ne sais pas comment faire car je ne peut pas utiliser la fonction LIMIT car chaque article est défini par un ID, mais il se peut qu'il y ait des articles supprimés.

Exemple : j'ai des articles avec les id respectifs 1, 2, 4, 8, 20 et 25. Pourtant au total il n'y a que 6 articles or si je met LIMIT = 20, il m'affichera que les 4 premiers articles...

Comment faire alors pour séléctionner le nombre d'article n de la table SQL ?

Merci de votre réponse

  • Author

Merci pour ta réponse, mais pourquoi quand j'utilisait le LIMIT et que je mettais LIMIT 0,20 il ne m'affichait que les articles précédents et incluant celui possédant l'id = 20 ?

LIMIT 0,20 => à partir du premier résultat, se limiter aux 20 premiers.

pour ton problème, test tes requettes sql directement par ton client sql (par exemple par phpmyadmin).

Archived

This topic is now archived and is closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.