Skip to content

Instantly share code, notes, and snippets.

@jdlx
Created June 26, 2012 11:46
Show Gist options
  • Save jdlx/2995332 to your computer and use it in GitHub Desktop.
Save jdlx/2995332 to your computer and use it in GitHub Desktop.
rex_select: alle Kategorien und Article mit article_id hinter dem Namen
<?php
// qry: get all cats & articles, label non-start-articles..
$qry = 'SELECT CONCAT (IF(`startpage`,`catname`, CONCAT(`name`, " :: Artikel ::")), " [", `id`, "]"), `id`, `id`, `re_id`
FROM `rex_article`
WHERE `clang`=0
ORDER BY `startpage` DESC, `catprior`, `prior`';
// rex_select ...
$select->addOption('none','');
$select->addSqlOptions($qry);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment