"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. |
Quote:
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. |
dont forget once you open your mysql to USE DBNAMEHERE; or it wont update your database. For ex.
use peq; source schema.sql; |
All times are GMT -4. The time now is 04:36 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.