Difference between revisions of "LinkFerret/sql/link"
< LinkFerret | sql
Jump to navigation
Jump to search
(I wrote this many days ago. Firefox didn't lose it. Yay!) |
(changes) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Purpose''': for posting a link | * '''Purpose''': for posting a link | ||
+ | * '''History''': | ||
+ | ** '''2013-06-28''' | ||
+ | *** Removed '''ID_User''' - redundant since we're using [[PostFerret/sql/post|post]] in [[PostFerret]] | ||
+ | *** Corrected table name to "link" (was still "post"). | ||
==SQL== | ==SQL== | ||
− | CREATE TABLE ` | + | <mysql> |
+ | CREATE TABLE `link` ( | ||
`ID_Post` INT NOT NULL COMMENT "ID of post to which this link is attached", | `ID_Post` INT NOT NULL COMMENT "ID of post to which this link is attached", | ||
− | + | `URL` VARCHAR(255) DEFAULT NULL COMMENT "the link being stored", | |
− | `URL` VARCHAR(255) DEFAULT NULL COMMENT " | ||
PRIMARY KEY(`ID_Post`), | PRIMARY KEY(`ID_Post`), | ||
UNIQUE KEY `content` (`URL`) | UNIQUE KEY `content` (`URL`) | ||
) | ) | ||
ENGINE = MYISAM; | ENGINE = MYISAM; | ||
+ | </mysql> |
Latest revision as of 19:57, 29 June 2013
About
- Purpose: for posting a link
- History:
- 2013-06-28
- Removed ID_User - redundant since we're using post in PostFerret
- Corrected table name to "link" (was still "post").
- 2013-06-28
SQL
<mysql> CREATE TABLE `link` (
`ID_Post` INT NOT NULL COMMENT "ID of post to which this link is attached", `URL` VARCHAR(255) DEFAULT NULL COMMENT "the link being stored", PRIMARY KEY(`ID_Post`), UNIQUE KEY `content` (`URL`) ) ENGINE = MYISAM;
</mysql>