[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!
Ideas Centre
Locked
User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10799
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

[Tutorial] How to use phpMyAdmin

Post by battye » Fri Nov 02, 2007 6:44 am

How to use phpMyAdmin

Many MOD's require users to run a file to apply SQL changes, however, there are some that require you to make manual database changes.

In 2.0.x MOD's, you know you are required to apply SQL changes manually when there is no update file supplied, and you find the following action in the MOD install file:

Code: Select all

#
#-----[ SQL ]------------------------------------------
#
In a MODx file, you will find a similar action.

In the SQL section, you may find many different queries. This tutorial explains how to manually apply these using phpMyAdmin.

For the sake of this tutorial, suppose the SQL query you were required to run was as follows (note: there may be more than one, they will all be listed).

Code: Select all

INSERT INTO phpbb_config (config_name, config_value) values('allow_userbar_upload', '1');
Opening phpMyAdmin

More often than not, a link to phpMyAdmin will be provided, under the databases section, in your webhosts cPanel, Ensim or another sort of control panel. If you are unable to find a link to phpMyAdmin from your control panel, you may need to talk to your webhost and ask if it is preinstalled. If it is not, you will need to install it yourself. Download phpMyAdmin, and find documentation on installation, from http://www.phpmyadmin.net/

What to do once in phpMyAdmin

After opening the program, on the left panel, navigate to your database by clicking the dropdown menu, and clicking the database which your forum resides in.

The right panel will then display a list of tables. Ignoring these, proceed to clicking the "SQL" tab on the top navigation bar.

Image

Paste the query/queries that you need into the large box titled "Run SQL query/queries on database". Ensure the table prefix is correct. In the majority of cases, it will simply be phpbb_, but in this case, it was myforum_. Check the box "Show this query here again" and once satisfied, proceed to click "Go".

Image

You know the queries were executed successfully if no errors appear. You should get a screen similar to this:

Image

If you get any errors, read the error message carefully and rectify the problem. If you are unsure of an error message, and you are not able to find an answer after searching the forum and searching Google, feel free to post it within this topic for further assistance.

Thanks,

The phpBB MOD Team
Customisations Team Member

User avatar
mara7
Registered User
Posts: 139
Joined: Wed May 11, 2005 5:59 pm

How to use phpMyAdmin

Post by mara7 » Fri Nov 02, 2007 12:11 pm

thats good ..
it is useful ..
I love it ..

regard ,

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10799
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by battye » Fri Nov 02, 2007 12:28 pm

mara7 wrote:thats good ..
it is useful ..
I love it ..

regard ,
Thanks :)
Customisations Team Member

yaw_pakhtoon
Registered User
Posts: 107
Joined: Wed Sep 12, 2007 12:18 am

Re: [Tutorial] How to use phpMyAdmin

Post by yaw_pakhtoon » Mon Nov 05, 2007 12:35 pm

thanks alot for this.. i sometimes get confussed..
Image

SpongeFreak52
Registered User
Posts: 83
Joined: Tue May 23, 2006 12:54 am
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by SpongeFreak52 » Tue Nov 06, 2007 10:40 pm

Nice job! Simple, yet very helpful I'm sure.

User avatar
enix
Registered User
Posts: 20
Joined: Thu Oct 04, 2007 4:19 pm

Re: [Tutorial] How to use phpMyAdmin

Post by enix » Thu Nov 08, 2007 8:49 pm

Thank you, direct and usefull tutorial.
[]'s

User avatar
jwxie
Registered User
Posts: 392
Joined: Wed Feb 01, 2006 3:45 am
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by jwxie » Fri Nov 09, 2007 4:28 pm

this is a great tutorial
it's good to expand the subject into more detail caterogies

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3180
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by bonelifer » Fri Nov 09, 2007 6:33 pm

This is good. So why haven't you submitted it to the KB? Marshalrusty isn't that mean. :lol:
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10799
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by battye » Sat Nov 10, 2007 3:20 am

Thanks for the kind words everyone, I am glad everyone is finding it useful :)
Customisations Team Member

jmjm003
Registered User
Posts: 275
Joined: Sat Dec 22, 2007 7:05 pm

Re: [Tutorial] How to use phpMyAdmin

Post by jmjm003 » Wed Dec 26, 2007 9:48 pm

Thanks for the info.
Being new to php and mysql every little bit helps. (former .asp & access user)

I do have a question if you don't mind.
How would you remove your example from the database if you wanted to.
I can insert, just do not know how to remove. (sounds kinda personal there. :shock:)

Any help would be appreciated.

JM

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10799
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by battye » Thu Dec 27, 2007 5:23 am

:shock: :lol:

If you want to delete a record, you can use code like:

Code: Select all

DELETE FROM tablename WHERE column = 'value';
Or you can find the record, and click the delete button next to it - if I remember correctly it is a little red cross.

A word of warning - be very careful when deleting records, it is irreversible and not something you should do unless you are 100% confident.
Customisations Team Member

User avatar
m1k30rz
Registered User
Posts: 52
Joined: Sun Jun 05, 2005 6:14 am
Location: New Zealand
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by m1k30rz » Fri Dec 28, 2007 11:36 am

Great tutorial! Whats the best version of phpMyAdmin to use though?

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 » Fri Dec 28, 2007 1:31 pm

Just stayed updated but I think it depends on your host.
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs

User avatar
ThunderCrew
Registered User
Posts: 1438
Joined: Sat Jun 30, 2007 6:26 pm
Location: Ill, Usa
Contact:

Re: [Tutorial] How to use phpMyAdmin

Post by ThunderCrew » Thu Jan 10, 2008 5:52 am

Good tutorial and perhaps you could help with what I posted on the support forum.
I am trying to make one of my pages to work on 3.0 wich does work on 2.x, but not sure
how to get it right now.

I need to do a "user is logged in check" then IF they are logged in pull some info out of the databse
from the admin created custom profile filed for that user.

Any ideas/
Ugg im a t0tal newb again ...... 2 years off cant remember jack ... time to get to it

gbr1918
Registered User
Posts: 31
Joined: Fri Jan 26, 2007 10:04 pm

Re: [Tutorial] How to use phpMyAdmin

Post by gbr1918 » Mon Jan 14, 2008 6:36 pm

Hi Thundercrew,
The easiest way (I think) is something like
<?php
if(ISSET your_cookie){
do the database connection;
do the database query;
do whatever else with the data;
.......;
}
?>
(Sorry, the post doesn't show the indents!)
Hope that helps.
Dave

Locked

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

Who is online

Users browsing this forum: No registered users and 15 guests