4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Dmitro on August 22, 2002, 12:53:24 AM
-
Dear Jan,
I am trying to work out how to change the column auth_directupload in MySQL. I get MySQL error because the syntax is not correct. I don't know what is not correct, because I checked it with my book and it seems to be correct but...
The task:
I want to change upload permission from 2 (Registered Users) to 9 (private) so that I can validate images.
I don't like an idea to change it from the Admin panel where I have to edit permissions for every category (133 at this moment). It takes really a lot of time, and I know there is a better way to do it, namely by working on MySQL via MyPHPadmin.
Instead of changing line by line I want to ALTER the MySQL table.
Could you please help me what is the syntax to do so?
-
Sorry, I forgot to write the syntax I tried to use:
UPDATE 4images_categories SET auth_directupload = 3,
WHERE cat_id = 1;
I tried to use WHERE in order to avoid a grand disaster in case I make a bad mistake. Normally I'd like to set the value of auth_directupload = 3 for all cat_id.
-
:D Jan, I just crossed my fingers and pushed GO.
UPDATE 4images_categories SET auth_directupload = 3;
OK. It worked. All the categories were set to the desired permissions. Thanks for the clarity of the database! Well thought.
Dmitry
-
Dear Jan,
Again - a question.
How to modify data in a MySQL 4images_images table?
I have a column, called images_keywords.
In that column I have keywords such as viola braccio.
How to change it into viola_da_braccio?
I don't have yet a book about MySQL at hand. The commands which I have found on the Internet are correct, but I have not succeeded to make a sense of it. I did something wrong and had only MySQL errors.
Could you teach me about a correct syntax, please?
Thanks, indeed.
Dmitry
-
Try phpMyAdmin (http://www.phpmyadmin.net). This is the best program to manage mysql databases.
Jan
-
Jan, thanks for your reply.
Thats what I use but I have to give it a correct command.
MySQL seems to be such a bestseller that, increadible, there is no single book in Brussels' shops! :cry:
Dmitry
-
Jan, did you receive Russian language pack from me?
I translated it for you and sent yesterday.
Please, be careful - my computer is not russified - so the files were saved as Unicode!!! I already tried to combine Japanese and PHP typed in my computer and it did not work. :oops:
Dmitry
-
Yes, i received your mail. I've give you no feedback because i'm very busy at the moment, sorry.
If you want to offer the language pack, please post it at the mods forum, thanks.
Jan
-
Jan,
I solved the problem - you don't need to reply it.
I type here what I did, since it might be interesting for other users.
To update values in a specified column in a table (or a selection of a table),
open MyPHPadmin (I assume you have it installed on your server), and enter the following command:
UPDATE 4images_images SET image_keywords = 'your keywords separated by spaces' WHERE image_id = '2';
UPDATE 4images_images SET image_keywords = 'your other keywords separated by spaces' WHERE image_id = '3';
etc.
I assume you want to UPDATE table 4images_images and a column image_keywords. Of course, you can UPDATE any table and any COLUMN or COLUMNS.
Dmitry