Skip to content

Instantly share code, notes, and snippets.

@chris-at-github
chris-at-github / einen Datensatz
Last active September 15, 2017 05:54
Datenbankabfragen
$GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid', 'pages', $where, 'GROUP', 'ORDER')
@chris-at-github
chris-at-github / OxContent
Created June 20, 2013 06:42
Oxid Smarty Snippets
[{oxcontent ident="OXCMSIDENTIFIER"}]
[{assign var="VARNAME" value="STRING-`$SMARTYVAR`"}]
@chris-at-github
chris-at-github / GetCategories
Created June 20, 2013 07:21
Kategorie laden
$oDb = oxDb::getInstance();
$oCategory = oxNew('oxcategory');
$oCategory->setLanguage($this->getLanguage());
$sWhere = $oCategory->getSqlActiveSnippet();
$sSelect = 'SELECT * FROM
oxcategories
WHERE oxcategories.oxid = \'' . $oDb->escapeString($sOxid) . '\'';
if($oCategory->assignRecord($sSelect)) {
UPDATE tx_datamintstrainingmanager_domain_model_trainings a
LEFT JOIN _aukom_kurse b ON
a.import_org_id = b.lfdnr
SET
question_languages = 1
WHERE b.de_en = 0
AND a.uid = 1407
ErrorDocument 404 /404/
AddType application/x-httpd-php .html
return preg_replace(
array("|Ä|", "|Ö|", "|Ü|", "|ä|", "|ö|", "|ü|", "|ß|", "|[^-:/.a-zA-Z0-9\.+]|"),
array("Ae", "Oe", "Ue", "ae", "oe", "ue", "ss", $replace),
str_replace($arr, "", $str)
);
preg_replace('#[/\\\\]+#', '/', $STRING);
@chris-at-github
chris-at-github / Weiterleitung auf www
Created June 27, 2013 07:58
Weiterleitungen im allgemeinen
RewriteEngine On
RewriteCond %{HTTP_HOST} ^deinedomain.de$ [NC]
RewriteRule ^(.*) http://www.deinedomain.de/$1 [L,R=301]