Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

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.

[réglé] Comment récupérer l'id de l'élément que l'on vient d'insérer???

Featured Replies

Posté(e)

Bonjour, voici mon problème, je souhaites insérer des éléments en cascade.

Imaginons un élément 1.

et des éléments 1.1 et 1.2 qui sont donc des éléments qui possèdent une référence vers l'élément 1. (l'id en question).

Cet id est un champ auto incrément dans ma table(TIME_ID integer primary key autoincrement ). Ma question est :

Comment faire lors de l'insertion pour récupérer l'id que la basse de donnée a affecté à cet élément là lors de son insertion???

Pour bien comprendre:

J'insère mon élément 1. (il me faut récupérer cet id, cette clef primaire unique lors de l'insertion!!! Comment la récupérer?)

Je construit mon élément 1.1 en lui précisant l'id de 1.

Je l'insère.

Je construit mon élément 1.2 en lui précisant l'id de 1.

Je l'insère.

Comment récupérer la valeur de ce champ lors de l'insertion de l'élément 1???? Merci d'avance.

Modifié par Burn2

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Account

Navigation

Rechercher

Rechercher

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.