[Tutorial] How to use phpMyAdmin

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
Locked
obvios
Registered User
Posts: 45
Joined: Sat Sep 13, 2008 2:34 am

Re: [Tutorial] How to use phpMyAdmin

Post by obvios »

ok.. i've open the SQL and this window come out.
is this right window?

Image

if it is correct, so i need to paste all the code and click 'GO' ?
User avatar
easygo
Registered User
Posts: 689
Joined: Sun Oct 31, 2004 4:23 pm
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by easygo »

Just give it a shot! If something goes wrong, you will receive an error message.

P.S. tabs like SQL can be found on the right panel, you knew that?

If not, try again from the beginning. :idea:

http://www.phpbb.com/community/viewtopi ... 5#p8012855
Casual developer for AJAX Chat on behalf of the author / Arcade Center powered by phpBB Arcade

A problem well put is half solved. (John Dewey, 1859–1952)
kramsman
Registered User
Posts: 19
Joined: Sat Nov 08, 2008 4:27 am

Re: [Tutorial] How to use phpMyAdmin

Post by kramsman »

This was really useful - thanks.

Is there a way to write macros or scripts in phpMyAdmin? I want to run a few different queries on multiple tables from time to time. Is there a way to save them in a program that can be run?

Also, how do I bring back a query in phpMyAdmin to edit it and rerun it with a slight change?

Thanks,
Brian
obvios
Registered User
Posts: 45
Joined: Sat Sep 13, 2008 2:34 am

Re: [Tutorial] How to use phpMyAdmin

Post by obvios »

ok..
i've already give a try..
but it come out with this:

MySQL said:
#1146 - Table 'letshcom_mysql19f0d489bfd8beb7539b71c796e.phpbb_config' doesn't exist


how to solve it?
User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by Tripp »

Are you using a different table prefix than phpbb?
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs
hhhgame
Registered User
Posts: 7
Joined: Thu Dec 25, 2008 5:32 pm

Re: [Tutorial] How to use phpMyAdmin

Post by hhhgame »

This tutorial is really nice, you know something i installed my first mod an announcement center for my forum, with the help of this, because i am a noob in php. this is superb :D
User avatar
battye
Extension Customisations
Extension Customisations
Posts: 11048
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by battye »

kramsman wrote:Is there a way to write macros or scripts in phpMyAdmin? I want to run a few different queries on multiple tables from time to time. Is there a way to save them in a program that can be run?
You could write them in a PHP file and have it run at a time (more or less, it could depend on when the next person accesses your website) you specify.
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D
Green Light
Registered User
Posts: 224
Joined: Fri Jan 16, 2009 10:10 pm

Re: [Tutorial] How to use phpMyAdmin

Post by Green Light »

What SQL query should I do to undo

Code: Select all

INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_post_colour', 'd82929');
I'm not that great w/ phpMyAdmin.. I tried...

Code: Select all

DELETE FROM testBB_config (config_name, config_value) VALUES ('new_post_colour', 'd82929');
It looked right, I got this error.
SQL query:

Code: Select all

DELETE FROM testBB_config(
config_name,
config_value
) VALUES (
'new_post_colour', 'd82929'
)
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(config_name, config_value) VALUES ('new_post_colour', 'd82929')' at line 1
Thank You.
Green Light
Registered User
Posts: 224
Joined: Fri Jan 16, 2009 10:10 pm

Re: [Tutorial] How to use phpMyAdmin

Post by Green Light »

Umm.. well I deleted manually but for reference I would really like to see what the right way is.. :roll:
User avatar
battye
Extension Customisations
Extension Customisations
Posts: 11048
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by battye »

Code: Select all

DELETE FROM phpBB_config WHERE config_name = 'new_post_colour';
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D
Green Light
Registered User
Posts: 224
Joined: Fri Jan 16, 2009 10:10 pm

Re: [Tutorial] How to use phpMyAdmin

Post by Green Light »

battye wrote:

Code: Select all

DELETE FROM phpBB_config WHERE config_name = 'new_post_colour';
Thanks ;)
User avatar
battye
Extension Customisations
Extension Customisations
Posts: 11048
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by battye »

Green Light wrote:
battye wrote:

Code: Select all

DELETE FROM phpBB_config WHERE config_name = 'new_post_colour';
Thanks ;)
You're welcome :)
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D
GabrielZM
Registered User
Posts: 1
Joined: Sun Feb 15, 2009 7:09 pm

Re: [Tutorial] How to use phpMyAdmin

Post by GabrielZM »

hi

to install a mod on a phpbb 3 forum - i need to run query's to turn them into php files, so i'm using this SQL parser http://sql.phpmix.com/index.php which should do same as the phpMyAdmin

i have trouble with how to insert the SQL statements that are in the MOD file

it has statements such as this:
CREATE TABLE phpbb_anti_bot_quest_config (
config_name VARCHAR(255) NOT NULL,
config_value VARCHAR(255) NOT NULL,
PRIMARY KEY (config_name)
);
and below a line of these:
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('abq_register', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('abq_guest', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('abq_variable_name', 'abq_0001');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('IndiQuests_CaseSensitive', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('IndiQuests_ImagePHP', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Individuel_Questions', '1');
and then again some of these:
CREATE TABLE phpbb_anti_bot_quest_confirm (
confirm_id CHAR(32) NOT NULL,
session_id CHAR(32) NOT NULL,
answer VARCHAR(255) NOT NULL,
line1 VARCHAR(255) NOT NULL,
line2 VARCHAR(255) NOT NULL,
line3 VARCHAR(255) NOT NULL,
line4 VARCHAR(255) NOT NULL,
color CHAR(1) NOT NULL,
whichform CHAR(1) NOT NULL,
start_time INT(11) NOT NULL,
PRIMARY KEY (confirm_id)
);

CREATE TABLE phpbb_anti_bot_quest_regconfirm (
confirm_id CHAR(32) NOT NULL,
session_id CHAR(32) NOT NULL,
start_time INT(11) NOT NULL,
PRIMARY KEY (session_id)
);
...and then more longer ones

so, i've tried throwing the entire SQL page in at once - didn't work
then divided it in parts according to where the 'CREATE TABLE' occurs with the INTRO lines that are under it, didn't work
already checked on prefix and such, that is in order

so, how do i turn this document into a valid php file ? (or multiple php's)

line by line? so that i get a php file for every line?

what to do then with the 'CREATE TABLE' parts ?

thx - some advice would be cool

Gabriel
guyver0
Registered User
Posts: 27
Joined: Mon Jan 26, 2009 2:48 pm

Re: [Tutorial] How to use phpMyAdmin

Post by guyver0 »

hello,
i need to learn to perform sql changes for some mods, but im a begginer, ive put up some mods without sql changes, and for a bit now ive been trying to install phpmyadmin with little success, i have downloaded the required package and uncompressed it and uploaded it to the root directory of my webhost, now what do i do? ive read the official documentation on the phpmyadmin page but i cant seem to understand it, i know i have to create a config.inc.php file but what do i put in it? and what do i do after that?
a little help would be much appreciated!
User avatar
battye
Extension Customisations
Extension Customisations
Posts: 11048
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by battye »

GabrielZM, I see no reason why the tool at phpmix wouldn't work. What you say "it didn't work", what do you mean? The tool didn't work, or the PHP file wouldn't run, etc?

There is an SQL generator tool at http://www.phpbbhacks.com/forums/db_generator.php - I have used this in the past and I have found it to work well, so you could also try that if you wanted.

guyver0, you will need to ask at the phpMyAdmin support site, they are best equipped to help you. Their site is http://www.phpmyadmin.net/home_page/support.php - they have a help forum which could be useful to you, although if you want quick help probably the IRC channel is best. You can use a web client at http://java.freenode.net so you don't have to install IRC software if you don't want to.
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D
Locked

Return to “[3.0.x] MODs in Development”