Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Running DB commands .. someone please help me  (Read 3222 times)

0 Members and 1 Guest are viewing this topic.

legend_neo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
Running DB commands .. someone please help me
« on: January 18, 2005, 09:00:11 pm »

hi .. let me clear first ... im just a student and dont know much about coding ...(but i m tryingmy best to understand) ..
so... please... dont get board of my stupid questions ...

ok.. the thing is i need help on running Data base commands... i m cuoting two coads ... and i dont know how to implement it ... so .. i was wondering if someone please explain them a little ... with step by step ....
thast will be a great help :)
coad from "A phpbb style 'who is online' block "
Code: [Select]
CREATE TABLE cpg_online (
  user_id int(11) NOT NULL default '0',
  user_ip tinytext NOT NULL,
  last_action datetime default NULL,
  PRIMARY KEY  (user_id,user_ip(15))
) TYPE=MyISAM;

and secondly  ...from "User Login with email instead of username "
Code: [Select]
INSERT INTO `cpg131_config` ( `name` , `value` )
VALUES (
'login_with', 'username'
);

i m just quoting these 2 examples for refrences. ... i just need to know ... how to creat these tables with data base . i m having php 4.3.10 and also i can use phpmyadmin ..
just a little guidnce of yours ...........
thankxxx in advance
« Last Edit: January 23, 2005, 08:46:04 pm by GauGau »
Logged

jmc

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 92
    • http://www.hartlepoolcameraclub.co.uk
Re: Running DB commands .. someone please help me
« Reply #1 on: January 18, 2005, 09:38:50 pm »

Hi, legend!
To run these sql commands on your database you need to log in to phpMyAdmin and select your coppermine database from the drop-down list on the left side of the screen. When the entire database structure is displayed, you will see all the db tables with their appropriate table "prefixes" (e.g. cpg132_ for latest version of CPG). This is an important point to observe... because the codes you have quoted will not actually work with later versions. You will first need to open both of your mysql files using notepad and manually edit the cpg_ and cpg131_ prefixes to match your existing database prefixes where necessary.
When you have done that, the steps in phpMyAdmin differ due to the nature of the sql command you wish to run.
Example 1 is creating a new table in the database. Copy the new command to the clipboard and click the SQL tab at the top of the Admin screen. In the large text area which you now see, paste the sql command, then click the "Go" button. phpMyAdmin will generate a short report commenting on the success or failure of the process. If successfull.. you're finished!
Example 2 is different. You are not creating a new table, you are INSERTING data into an existing table. So, copy the new command to clipboard, then click the selection box beside the table cpg131_config. Now, click the sql tab at the top. Paste the sql command into the text area and click Go. Finished!
Good luck!
John Mc
Logged
I'm trying hard... at least!

legend_neo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
Re: Running DB commands .. someone please help me
« Reply #2 on: January 23, 2005, 08:32:54 pm »

Thankxxx  a lot ..
it really helped me ..
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.