01 May 2007

From Organic Design wiki
Revision as of 01:11, 1 May 2007 by Nad (talk | contribs) (hmmm count gives one less result than specified)
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.