Ergebnis 1 bis 3 von 3

Thema: Problem with my MySQL command!

  1. #1
    HTML Newbie
    Registriert seit
    03.12.2018
    Beiträge
    2
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard Problem with my MySQL command!

    Hi


    I need help with my MySQL command.
    I want to create a page. I want that when I move the mouse over a photo, a small image appears somewhere in the same image, but in small format. I have pictures and small format. So, I created the page. I do it all with a CMS. I would like to add as many pictures to at least 2000! So, I do not always want to do because it takes a long time. So I created a table. With 2 structures, the first symbol is called the symbol and the second symbol is called smallicon. I always want to upload it to my website using the image uploader. But always, when I upload 2 images (small format and large format), only large format image appears. I hope you understand it a lot: I can not explain more clearly.
    Here is my SQL code:




    $ dir = "icons"; // it will be stored here
    $ i = 1;
    $ newname = $ _FILES ['icon'] ['name'];
    while (is_file ("$ dir / $ newname")) {
    $ ext = strrchr ($ _ FILES ['symbol'] ['name'], '.');
    $ newname = substr ($ _FILES ['icon'] ['name'], 0, - (strlen ($ ext) +1)). "$ _ $ I ext";
    $ I ++;
    }
    $ upload = move_uploaded_file ($ _ FILES ['icon'] ['tmp_name'], "$ dir / $ newname");
    chmod ("$ dir / $ newname", 0777);
    // (NOW WHICH IS A PART, AND WHAT IS,


    $ newnamess = $ _FILES ['ssicon'] ['name'];
    while (is_file ("icons_small / $ newnamess")) {
    $ extss = strrchr ($ _ FILES ['ssicon'] ['name'], '.');
    $ newnames = substr ($ _ FILES ['ssicon'] ['name'], 0, - (strlen ($ extss))). "_ $ Iss $ extss.";
    $ Iss ++;
    }
    $ upload = move_uploaded_file ($ _ FILES ['ssicon'] ['tmp_name'], "furnis_small / $ newnamess");
    chmod ("furnis_small / $ newnamess", 0777);


    // enter the table
    $ time = time ();
    $ query = mysql_query ("INSERT INTO" prefix $. "image (symbol, ssicon) VALUES
    ('

  2. #2
    Großmeister(in)
    Registriert seit
    24.10.2016
    Beiträge
    604
    Danke
    0
    Bekam 45 mal "Danke" in 44 Postings

    Standard AW: Problem with my MySQL command!

    Debug correctly


    1. One notices that a script does not do what it should.
    2. Write the line at the beginning of the script: error_reporting (-1);
    3. Use ini_set ('display_errors', true); so that the errors are also displayed.
    4. One tries to limit the place which can be at fault. If this does not work, the entire script will initially be considered bad.
    5. At prominent points in the script, you can output important variable contents and, if necessary, also issue a short output in conditional statements in order to check which condition has been executed. Important for MySQL errors (... not valid MySQL result resource ...): Use mysqli_error () or output query and test eg with phpmyadmin.
    6. is repeated until inconsistencies in the script become apparent
    7. This has found the problem (inconsistency) and can try to fix it. This is then the PHP documentation and other sources as a guide.
    8. If the concrete problem still can not be solved, one can ask in forums for advice.
    9. The program is running and you can remove the debug output again.


    The mysql_ * functions are deprecated and should not be used anymore. Use the mysqli_ * functions

  3. #3
    HTML Newbie
    Themenstarter

    Registriert seit
    03.12.2018
    Beiträge
    2
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard AW: Problem with my MySQL command!

    I still feel very vague

Ähnliche Themen

  1. MySQL - Insert Problem - kein Syntax-Fehler - MySQL-Struktur-Fehler?
    Von hpuettma im Forum Datenbank Forum - MySQL und andere Datenbanksoftware
    Antworten: 8
    Letzter Beitrag: 08.06.2017, 12:11
  2. Debian Command Make, Make Install... ? Wie macht man das ?
    Von Teron Gerofied im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 1
    Letzter Beitrag: 09.08.2013, 10:28
  3. EXCEL / VBA USERFORM mit Web Browser - Gif aniemiert < möchte Command Button einfügen
    Von FREUNDEXCEL im Forum Forum für alle anderen Programmiersprachen
    Antworten: 3
    Letzter Beitrag: 01.05.2013, 23:01
  4. MySQL Problem
    Von kohlmarc im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 12
    Letzter Beitrag: 16.10.2010, 15:19
  5. PHP/MYSQL Problem
    Von Kämpfer im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 18
    Letzter Beitrag: 24.10.2009, 15:00

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •