PDA

View Full Version : Executing queries in PhpMyAdmin


Littlebit
11-06-2001, 07:22 PM
I don't want to mess this up...if I want to run this query in PhpMyAdmin:
CREATE TABLE user_rate (
userrateid int(10) unsigned NOT NULL auto_increment,
rateduser int(10) unsigned DEFAULT '0' NOT NULL,
userid int(10) unsigned DEFAULT '0' NOT NULL,
userrating smallint(6) DEFAULT '0' NOT NULL,
PRIMARY KEY (userrateid),
KEY rateduser (userid)
);
ALTER TABLE user ADD ratenum SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL;
ALTER TABLE user ADD ratetotal SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL;
ALTER TABLE user ADD allowrate SMALLINT(5) UNSIGNED DEFAULT '1' NOT NULL;

Do I go to User, then enter all of that in Run SQL query/queries on database, then click Go?

Mark Hensler
11-06-2001, 09:45 PM
In which database? What is this for?

I am assuming that your NOT altering the 'mysql' database. Right? RIGHT?!?

As long as you have the correct database selected, it doesn't matter which table you are looking at when executing a query in phpMyAdmin.

Littlebit
11-06-2001, 09:50 PM
In the vB database. It's for the rate a user hack. I went ahead and did it after backing up the database...so far so good...I think! I went into the board database and acessed myPhpAdmin and found user. I ran that query and it said it was successful. :sigh:
Did I do something wrong?

Mark Hensler
11-06-2001, 09:52 PM
Originally posted by Littlebit
I ran that query and it said it was successful. :sigh:
Did I do something wrong? You just said it told you it was successful. That doesn't sound wrong to me. ;)

Littlebit
11-06-2001, 09:56 PM
:surprised
It's scary stuff when you aren't sure what the heck you're doing. Thank you for reassuring me. The board seems fine so far. So if I had done it wrong I guess I would have gotten an error right away right?

Mark Hensler
11-06-2001, 10:02 PM
Yes, phpMyAdmin would have printed any errors that mySQL reported.

Littlebit
11-06-2001, 10:04 PM
:) <------big smile

Mark Hensler
11-07-2001, 04:11 AM
:D