Hotfix release available: 2026-07-14b "Mort".
upgrade now! [57.2] (what's this?)
onny:notizen:programmierung
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| onny:notizen:programmierung [2026/07/24 13:52] – [php] fdc9:281f:4d7:9ee9::1 | onny:notizen:programmierung [2026/08/18 11:23] (current) – [mariadb / mysql] fdc9:281f:4d7:9ee9::1 | ||
|---|---|---|---|
| Line 535: | Line 535: | ||
| $a = array (' | $a = array (' | ||
| print_r($a); | print_r($a); | ||
| + | </ | ||
| + | |||
| + | filter array only unique items | ||
| + | |||
| + | <code php> | ||
| + | $userIds = array_unique($userIds); | ||
| + | </ | ||
| + | |||
| + | append to array | ||
| + | |||
| + | <code php> | ||
| + | $fruits = [' | ||
| + | $fruits[] = ' | ||
| </ | </ | ||
| Line 646: | Line 659: | ||
| return new Calendar($calendar); | return new Calendar($calendar); | ||
| } | } | ||
| + | </ | ||
| + | |||
| + | print and debug php database queries | ||
| + | |||
| + | <code php> | ||
| + | $query-> | ||
| + | -> | ||
| + | -> | ||
| + | |||
| + | printf(" | ||
| + | printf(" | ||
| + | </ | ||
| + | |||
| + | check if array key exists (avoid undefined warning) via "null casting" | ||
| + | |||
| + | <code php> | ||
| + | if ($config[' | ||
| </ | </ | ||
| ==== nextcloud app dev ==== | ==== nextcloud app dev ==== | ||
| Line 679: | Line 709: | ||
| </ | </ | ||
| + | logging | ||
| + | |||
| + | <code php> | ||
| + | $this-> | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ]); | ||
| + | </ | ||
| ==== wordpress ==== | ==== wordpress ==== | ||
| registering menus | registering menus | ||
| Line 887: | Line 926: | ||
| </ | </ | ||
| + | sort column by timestamp and convert to datetime | ||
| + | |||
| + | <code sql> | ||
| + | SELECT | ||
| + | `id`, | ||
| + | `calendarid`, | ||
| + | FROM_UNIXTIME(`firstoccurence`) AS firstoccurence, | ||
| + | FROM_UNIXTIME(`lastoccurence`) | ||
| + | FROM `oc_calendarobjects` | ||
| + | WHERE (`lastoccurence` < 1606694400) | ||
| + | AND (`firstoccurence` > 0) | ||
| + | AND (`componenttype` = ' | ||
| + | ORDER BY `lastoccurence` DESC; | ||
| + | </ | ||
onny/notizen/programmierung.1784901165.txt.gz · Last modified: by fdc9:281f:4d7:9ee9::1
