Running DB commands .. someone please help me Running DB commands .. someone please help me
 

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]

Main Menu

Running DB commands .. someone please help me

Started by legend_neo, January 18, 2005, 09:00:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

legend_neo

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 "
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 "
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

jmc

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
I'm trying hard... at least!

legend_neo