Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-27-2010, 01:54 AM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default "Source this"

What does "source this" mean?

As in:
"Source schema.sql (in the editor's /sql directory) into your database."


or another example:
"Source this:
CREATE TABLE rule_sets (
ruleset_id TINYINT UNSIGNED NOT NULL auto_increment,
name VARCHAR(255) NOT NULL,
PRIMARY KEY(ruleset_id)
);
INSERT INTO rule_sets VALUES(0, "default");
UPDATE rule_sets SET ruleset_id=0;
CREATE TABLE rule_values (
ruleset_id TINYINT UNSIGNED NOT NULL,
rule_name VARCHAR(64) NOT NULL,
rule_value VARCHAR(10) NOT NULL,
INDEX(ruleset_id),
PRIMARY KEY(ruleset_id,rule_name)
);"

Mind you, I don't want an explanation of the code block above--what it does and why, I just want to know what "Source this" means you are supposed to do with it.
Reply With Quote
  #2  
Old 10-27-2010, 02:15 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,448
Default

Quote:
Originally Posted by revloc02c View Post
What does "source this" mean?

As in:
"Source schema.sql (in the editor's /sql directory) into your database."


or another example:
"Source this:
CREATE TABLE rule_sets (
ruleset_id TINYINT UNSIGNED NOT NULL auto_increment,
name VARCHAR(255) NOT NULL,
PRIMARY KEY(ruleset_id)
);
INSERT INTO rule_sets VALUES(0, "default");
UPDATE rule_sets SET ruleset_id=0;
CREATE TABLE rule_values (
ruleset_id TINYINT UNSIGNED NOT NULL,
rule_name VARCHAR(64) NOT NULL,
rule_value VARCHAR(10) NOT NULL,
INDEX(ruleset_id),
PRIMARY KEY(ruleset_id,rule_name)
);"

Mind you, I don't want an explanation of the code block above--what it does and why, I just want to know what "Source this" means you are supposed to do with it.
It means load the mysql .sql file into your database. For the example listed, open up a MySQL command prompt and type "source schema.sql;"

If you are in the same folder as the SQL file on the command prompt, it will begin entering that schematics into the database. In this example, it is a table. It can also enter rows of data into your database, I always check what's being added before I 'source' it.

Hope that elaborates on it some.
Reply With Quote
  #3  
Old 11-09-2010, 10:24 PM
core
Sarnak
 
Join Date: Aug 2005
Posts: 32
Default

dont forget once you open your mysql to USE DBNAMEHERE; or it wont update your database. For ex.

use peq;
source schema.sql;
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:51 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3