Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

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.

Mysql Eintrag Problem Err 1242

Empfohlene Antworten

Huhu, wollte eigentlich nach einem Tutorial her folgendes eintragen:

INSERT INTO entity_stats(stat_id,entity_id,value,entity_type) VALUES ((SELECT id FROM stats WHERE short_name='token'),(SELECT id FROM items WHERE name='Red Potion'),'potion','Item');

Aber da bekomme ich immer die Fehlermeldung:

[Err] 1242 - Subquery returns more than 1 row

[Err] INSERT INTO entity_stats(stat_id,entity_id,value,entity_type) VALUES ((SELECT id FROM stats WHERE short_name='token'),(SELECT id FROM items WHERE name='Red Potion'),'potion','Item');

[Msg] Finished - Unsuccessfully

Wäre echt lieb, wenn mir da jemand weiterhelfen könnte.

Liebe Grüße Doddie

Eines deiner Subquery (oder beide?) liefern mehr als einen Datensatz zurück und dadurch kann der Befehl nicht ausgeführt werden.

D.h. es gibt mehr als einen Datensatz in stats/items in dem der short_name = 'token' bzw. der name = 'Red Potion' ist.

Ah, jetzt hab ich es hinbekommen. In der Tat war es bereits vorhanden. Hab vielen Dank. Hast mir wirklich sehr geholfen. :)

Ganze liebe Grüße ;)

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.