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.

PHP bzw. Perl mit MySQL

Empfohlene Antworten

Veröffentlicht

Servus... sitze hier auf der Arbeit und kriege einen Hals...

Soll eine Migration von verschiedenen MIME-Typen in eine MySQL-DB realisieren.

Wie lasse ich denn den MIME-Typ erkennen und wie spreche ich die Felder in der gefundenen/benötigten Datei an??

So weit ich es weiß müsste ich für jeden MIME-Typ eine Funktion schreiben a lá

Meine Funktion: sub MIME_destroyer ;)



print "Die gesuchte Datei eingeben: ";

chomp(my $name = <STDIN>);


sub MIME_destroyer

{


open(DATEI, "<$name") || die "Datei nicht gefunden";


my @Daten = <DATEI>;


if (Dateiendung bekannt)

{

if (Dateiendung :confused: =~ \.xls)

    {

    Tu dies und das

    }


if (Dateiendung =~ \.csv)

    {

    Tu dies und noch mehr

    split wenn "," und beende bei \n oder \r\n oder wenn ich die schnauze voll habe 

    }

} else

{ print "Guckst du... ich nix kennen }

}

# wenn fertig, dann pack in MySQL

[/code]

[b]Privates Projekt auf[/b] >>> Klick <<<

Habe Probleme ein in PHP-Eingegebenes Geburtsdatum in ein Date-Feld auf MySQL zu schiessen, angeblich gibt es da Formatierungsporbleme... weiß einer mehr??

Was ist ein PHP eingegebenes Datum? MySQL speichert in Date in diesem Format: JJJJMMDD. Gibt Du dieses selber ein, musst Du es umwandeln, benutzt Du Trennzeichen wie Punkte, verwende explode und setzte die Array Stückchen in richtige Format im Query zusammen.

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.