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
('