Helpful Information
 
 
Category: vB3 Programming Discussions
Executing queries in PhpMyAdmin

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?

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.

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?

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. ;)

: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?

Yes, phpMyAdmin would have printed any errors that mySQL reported.

:) <------big smile

:D










privacy (GDPR)