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.

SQL case sensitive?

Empfohlene Antworten

Hallo,

ich habe ein (hoffentlich) nur kleines Problem ;)

Ich würde gerne aus meiner MySQL Datenbank einen bestimmten Wert. Problem an der ganzen Sache ist das das ganze case sensitive geschehen sollte.

Die Tabelle Sieht wie folgt aus:

id int

typ int

wertname varchar

Bisher alles easy ;) So nun aber das Problem bei dem Feld wertname gibt es einmal unteranderem den Wert "d" sowie den Wert "D" und die möchte ich halt auch gerne getrennt auslesen können.

Bei meinen ersten Versuch hatte ich garnicht erst dran gedacht und ganz normal:

$sql = "SELECT id,typ FROM products_info_types WHERE wertname = '".$header."'";

probiert was das Ergebnis nach sich zog das für "d" die id von "D" ausgelesen wurde. Also habe ich mal eine Runde gegooglt und bin auf dieser Abfrage gestoßen:

$sql = "SELECT id,typ FROM products_info_types WHERE wertname regexp binary '".$header."'";

Was mir leider auch nicht so wirklich das richtige Ergebniss liefert und zwar liefert der mir den ersten Wert zurück wo wertname ein "d" beinhaltet. Nur gibts da eine Menge Werte die ein "d" beinhalten.

Hat jemand eine Lösung parat? Wäre mir sehr hilfreich.

Gruss l0rdseth

BINARY:d

"SELECT id,typ FROM products_info_types WHERE BINARY wertname = '".$header."'";

Danke dir.

War mal wieder klar das es nur an einem "wort" liegt das es nicht geklappt hat.

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.