Professional Web Applications Themes

Insert images into a table - MySQL

Hi to everyone! I'm trying to insert images into a table, but it doesn't work... I'm trying using the query: INSERT INTO immagini (nomefile, file, tipo_doc, data, ora, dimensioni, pubblicato, check_file) VALUES ('".$_POST['nomefile']."', '".$_POST['file']."', '". $_POST['tipo_doc']."', '".$_POST['data']."', '".$_POST['ora']."', '". $_POST['dimensioni']."', '".$_POST['pubblicato']."', '". $_POST['check_file']."', LOAD_FILE('C:\X00827715.TIF'); but it doesn't work...maybe there are many errors... is there anyone who could help me?thank you so much!...

  1. #1

    Default Insert images into a table

    Hi to everyone! I'm trying to insert images into a table, but it
    doesn't work... I'm trying using the query:

    INSERT INTO immagini (nomefile, file, tipo_doc, data, ora, dimensioni,
    pubblicato, check_file)
    VALUES ('".$_POST['nomefile']."', '".$_POST['file']."', '".
    $_POST['tipo_doc']."', '".$_POST['data']."', '".$_POST['ora']."', '".
    $_POST['dimensioni']."', '".$_POST['pubblicato']."', '".
    $_POST['check_file']."',
    LOAD_FILE('C:\\X00827715.TIF');

    but it doesn't work...maybe there are many errors... is there anyone
    who could help me?thank you so much!

    sonia.cotroneo@gmail.com Guest

  2. #2

    Default Re: Insert images into a table

    On Fri, 13 Jul 2007 02:06:36 -0700, com
    wrote:
     

    What's the exact error message?
    Are the images on the same CPU as the MyQL server?
    --
    ( Kees
    )
    c[_] He who laughs last probably made a backup. (#64)
    Kees Guest

  3. #3

    Default Re: Insert images into a table


    Kees Nuyt ha scritto:
     
    >
    > What's the exact error message?
    > Are the images on the same CPU as the MyQL server?
    > --
    > ( Kees
    > )
    > c[_] He who laughs last probably made a backup. (#64)[/ref]

    It gives the error:


    "Errore di sintassi nella query SQL vicino a 'prog']."','".
    $_POST['nomefile']."', '".$_POST['file']."', '".
    $_POST['tipo_doc' linea 1"

    That means:

    Sintax error nearby 'prog']."','".$_POST['nomefile']."', '".
    $_POST['file']."', '".
    $_POST['tipo_doc' line 1

    what's wrong?

    sonia.cotroneo@gmail.com Guest

  4. #4

    Default Re: Insert images into a table

    On Mon, 16 Jul 2007 01:38:30 -0700, com
    wrote:
     
    >>
    >> What's the exact error message?
    >> Are the images on the same CPU as the MyQL server?
    >> --
    >> ( Kees
    >> )
    >> c[_] He who laughs last probably made a backup. (#64)[/ref]
    >
    >It gives the error:
    >
    >"Errore di sintassi nella query SQL vicino a 'prog']."','".
    >$_POST['nomefile']."', '".$_POST['file']."', '".
    >$_POST['tipo_doc' linea 1"
    >
    >That means:
    >
    >Sintax error nearby 'prog']."','".$_POST['nomefile']."', '".
    >$_POST['file']."', '".
    >$_POST['tipo_doc' line 1
    >
    >what's wrong?[/ref]

    That's an error in your PHP code.
    Somehow there's something wrong with the way you build the query
    string. Try to find that error first (test by echo-ing the
    string to the webpage or use error_log().
    If you can't find the problem, you'd better ask in the PHP
    group, comp.lang.php i think it is.
    Post the complete code fragment.

    Good luck !
    --
    ( Kees
    )
    c[_] Like a lot of husbands throughout history, Mr. Webster would sit
    down and try to talk to his wife. As soon as he'd say something
    though, she'd fire back with, "And just what the hell is THAT
    supposed to mean?" Thus, Webster's Dictionary was born. (#6)
    Kees Guest

Similar Threads

  1. How Do you insert a table in Previous Table
    By jaze18 in forum Dreamweaver AppDev
    Replies: 0
    Last Post: May 3rd, 07:46 PM
  2. Replies: 0
    Last Post: July 23rd, 11:30 PM
  3. Insert into same table pulling one column from another table
    By Fred in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: August 12th, 09:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139