Semantic MediaWiki/data/smw subp2

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to: navigation, search

About

  • Version: 1.7

SQL

<mysql>CREATE TABLE `smw_subp2` (

 `s_id` int(8) unsigned NOT NULL,
 `o_id` int(8) unsigned DEFAULT NULL,
 KEY `s_id` (`s_id`),
 KEY `o_id` (`o_id`)

) ENGINE=InnoDB DEFAULT CHARSET=binary;</mysql>

Example

This example works syntactically and is consistent with the conventions used in other examples, but I haven't yet found any data to test it with. <mysql> SELECT s_id, o_id

 , CAST(s.smw_title AS char) AS s_title
 , CAST(o.smw_title AS char) AS o_title
 FROM
   (smw_subp2 AS x
   LEFT JOIN smw_ids AS s ON x.s_id=s.smw_id)
   LEFT JOIN smw_ids AS o ON x.o_id=o.smw_id;

</mysql>