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.

Empfohlene Antworten

Veröffentlicht

Hallo zusammen!

Bei folgender MySQL-Query

UPDATE
tabelle
SET
title = '$title',
file = '$file',
sequence = $sequence,
ontop = $ontop,
published = $published,
independent = $independent
WHERE
id = $id[/PHP]

wird mir anstelle von $title eine 0 in die Datenbank geschrieben. Wenn ich nun aber nach der Query $title mit echo ausgeben, dann hat $title aber den Wert den die Variable auch haben sollte.

Woran liegt es das mir da eine 0 in die Db geschrieben wird?

vielen dank für eure Hilfe!

Evtl liegts auch am Datentyp deine Feldes "title" in deiner Tabelle?

Welchen Datentyp hat dieses?

bei einfachen anführungszeichen ('...') werden inhalte von php nicht geparsed.

ist dein query in doppelten anführungszeichen ("...") ?

wenn nicht, probiers mal so.

edit:

wer lesen kann, ist klar im vorteil...

ich seh grad, dass du $file genauso einbindest, und das zu funktionieren scheint. falls das der fall ist, kanns daran ja nicht liegen.

Evtl liegts auch am Datentyp deine Feldes "title" in deiner Tabelle?

Welchen Datentyp hat dieses?

muss wohl ein numeric feld sein, sonst würde er keine 0 da rein schreiben, sondern ne fehlermeldung werfen, nicht desto trotz sollte man " die verwenden und nicht '

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.