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.

Abfrage Problem

Empfohlene Antworten

Veröffentlicht

MOrgen!

Hab ein kleines Abfrage Problem unter mySQL.

Habe eine Tabelle in der Produktnamen stehen und möchte dazu eine Abfrage mit PHP machen. Jetzt hab ich die abfrage fertig und dabei tritt folgendes Problem auf:

Die Abfrage:


$sql="SELECT produkt FROM software WHERE produkt='$produkt'";
$ergebnis=mysql_query($sql);
list($produkt2)=mysql_fetch_row($ergebnis);
[/PHP]

Jetzt kommen in der Tabelle aber mehrere Einträge vor, die in Ihrem Produktnamen das Sonderzeichen ' enthalten und somit funktioniert die Abfrage an der Stelle nicht mehr richtig.

Wie kann man das lösen?

Hab keine Chance auf eine ID zurückzugreifen, da in diesem Schritt eine CSV-Datei ausgelesen wird und die Produkte verglichen werden ob sie da schon drin stehen und wenn nicht eingefügt werden.

greetz

chris

du kannst das ' escapen in dem du nen \ davorsetzt^^

danke schön werds mal ausprobieren

greetz

chris

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.