Author Topic: [Simply Add] Multiple image upload by mysql  (Read 4921 times)

0 Members and 1 Guest are viewing this topic.

Offline Computerman

  • Newbie
  • *
  • Posts: 10
    • View Profile
[Simply Add] Multiple image upload by mysql
« on: January 06, 2009, 04:18:01 PM »
If you need this is a query for mysql:

INSERT INTO 4images_images (cat_id, user_id, image_name, image_keywords, image_active, image_media_file, image_allow_comments) VALUES (3, 1, 'Prova2', 'pippo pluto', 1, '19.jpg', 1)

where cat id is a category (you show a id of category in your admin pannel)
where user id is a member (you show a id member in your admin pannel)
where image_name is a name of images you want upload

if you prepare a more immage, you change only "image name" and insert more query and more image in one moment  :P

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Simply Add] Multiple image upload by mysql
« Reply #1 on: January 06, 2009, 04:33:52 PM »
what about image files?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Computerman

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [Simply Add] Multiple image upload by mysql
« Reply #2 on: January 06, 2009, 09:45:39 PM »
what about image files?

What? The image send with ftp...obviously this query is only for admin that have a full access of database and ftp. Image upload in a directory data/media/(number id category)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Simply Add] Multiple image upload by mysql
« Reply #3 on: January 07, 2009, 02:18:47 AM »
Yes, through FTP, but the file names still needs to be changed in the query you've posted.
If this method is easier for you, it's great. However, you forgot about other things 4images does when new images added: when you add images using 4images itself, it not only adds information about the images, it also generates search keywords, and maybe some other stuff, such as updates statistics. Just for the sake of an experiment try search via 4images search the images you've added using only MySQL query, I bet it won't find any.

So, in case you missed it some how, we have a guide for another method adding images via FTP, witch obviously is most preferable for majority of 4images users, it's more protected from human errors, with 100% proof from messing up the database.

Anyway, thank you for sharing with the community. Maybe someone find your method useful.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)