Difference between revisions of "01 May 2007"

From Organic Design wiki
m (hmmm count gives one less result than specified)
m (Reverted edits by Robin Patterson (talk) to last revision by Nad)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{news|img=|title=DPL "dpl_clview" column added to database|msg=
 
{{news|img=|title=DPL "dpl_clview" column added to database|msg=
 
The error which comes up when attempting to select uncategorised articles with DPL has been fixed. The error which comes up explaining how to add the new column has a syntax error in it because it contains a double apostrophe which is affected by the wikiparser. Also the [http://semeb.com/dpldemo/index.php/Manual_-_Source_and_Installation#Installation DPL documentation] regarding the additional column contained errors which I've fixed. The correct syntax for adding the column should be as folows (set ''prefix_'' appropriately before executing it).
 
The error which comes up when attempting to select uncategorised articles with DPL has been fixed. The error which comes up explaining how to add the new column has a syntax error in it because it contains a double apostrophe which is affected by the wikiparser. Also the [http://semeb.com/dpldemo/index.php/Manual_-_Source_and_Installation#Installation DPL documentation] regarding the additional column contained errors which I've fixed. The correct syntax for adding the column should be as folows (set ''prefix_'' appropriately before executing it).
<sql>
+
<sql>CREATE VIEW prefix_dpl_clview AS  
CREATE VIEW prefix_dpl_clview AS  
 
 
  SELECT IFNULL(cl_from, page_id) AS cl_from, IFNULL(cl_to, '') AS cl_to, cl_sortkey  
 
  SELECT IFNULL(cl_from, page_id) AS cl_from, IFNULL(cl_to, '') AS cl_to, cl_sortkey  
   FROM `prefix_page` LEFT OUTER JOIN `prefix_categorylinks` ON page_id=cl_from;
+
   FROM `prefix_page` LEFT OUTER JOIN `prefix_categorylinks` ON page_id=cl_from;</sql>
</sql>
 
 
This allows queries to select uncategorised pages, for example <tt><nowiki>{{#dpl:category=|count=5}}</nowiki></tt> which yields the following result:
 
This allows queries to select uncategorised pages, for example <tt><nowiki>{{#dpl:category=|count=5}}</nowiki></tt> which yields the following result:
 
{{#dpl:category=|count=5}}
 
{{#dpl:category=|count=5}}
 
}}
 
}}

Latest revision as of 22:15, 3 September 2011

Warning.svg This is a blog item that needs to be converted to the new Bliki format


DPL "dpl_clview" column added to database

The error which comes up when attempting to select uncategorised articles with DPL has been fixed. The error which comes up explaining how to add the new column has a syntax error in it because it contains a double apostrophe which is affected by the wikiparser. Also the DPL documentation regarding the additional column contained errors which I've fixed. The correct syntax for adding the column should be as folows (set prefix_ appropriately before executing it). <sql>CREATE VIEW prefix_dpl_clview AS

SELECT IFNULL(cl_from, page_id) AS cl_from, IFNULL(cl_to, ) AS cl_to, cl_sortkey 
 FROM `prefix_page` LEFT OUTER JOIN `prefix_categorylinks` ON page_id=cl_from;</sql>

This allows queries to select uncategorised pages, for example {{#dpl:category=|count=5}} which yields the following result:

Extension:DynamicPageList (DPL), version 3.3.3: Warning: Skipping bad option for parameter 'category'.


Extension:DynamicPageList (DPL), version 3.3.3: Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants


Extension:DynamicPageList (DPL), version 3.3.3: Warning: No results.