OC Coding Style: Unterschied zwischen den Versionen

Zur Navigation springen Zur Suche springen
fixed some syntax errors at ends of SQL-Strings
(fixed some syntax errors at ends of SQL-Strings)
 
(Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt)
Zeile 29: Zeile 29:
         FROM `caches`
         FROM `caches`
         JOIN `cache_logs` ON `cache_logs`.`cache_id` = `caches`.`cache_id`
         JOIN `cache_logs` ON `cache_logs`.`cache_id` = `caches`.`cache_id`
         WHERE `caches`.`status` IN ('&1', '&2')"
         WHERE `caches`.`status` IN ('&1', '&2')",
         $status1,
         $status1,
         $status2
         $status2
Zeile 36: Zeile 36:
Note that the opening " is on a tab position, while the following lines start one column to the right.
Note that the opening " is on a tab position, while the following lines start one column to the right.


If lines get too long, the parameters are moved to the next line(s) and indented to the next indent column (which is ''three'' chars right of the preceding line start):
If lines get too long, the parameters are moved to the next line(s) and indented to the next indent column (which is ''three'' chars right of the preceding line's keyword):


     $result = sql(
     $result = sql(
Zeile 50: Zeile 50:
         WHERE
         WHERE
             `caches`.`status` = '&2'
             `caches`.`status` = '&2'
             AND `cache_logs`.`user_id` = '&3'
             AND `cache_logs`.`user_id` = '&3'",
         $logType,
         $logType,
         $cacheStatus,
         $cacheStatus,
2

Bearbeitungen

Navigationsmenü