Variable Naming Conventions
From FMYiRCWiki
Freemed-YiRC Variable Naming Conventions
Contents |
[edit]
Summary
Variable naming conventions used throughout the Freemed-YiRC system.
[edit]
Standard
- All standard variables in Freemed-YiRC are prefixed with $fy_
[edit]
Variables Returned from Forms
- All variables returned from forms are prefixed with $gr_
[edit]
Counter/Index Variables
- All counter/index variables are called $jr or $jr1..$jr2 or prefixed with $jr_
[edit]
SQL/DB Result Variables
- All SQL query strings should be either $sql or prefixed with $sql_.
- All results from SQL DB queries should be $result_set (for result sets) and $rows (for the row number total indicator), or prefixed with $result_set_ and $rows_.
- Note: The fy2_sql_exec() function, when the 2nd and 3rd arguments are blank, sets the variables $result_set and $rows.
[edit]
Freemed-YiRC Predefined Variables
- $fydb_host = database IP/URL.
- $fydb_type = defines the database type (Ex: mysql)
- $fydb_name = defines the database name (Ex: freemed_yirc)
- $bgcolor1 = defines first color for alternating table row colors
- $bgcolor2 = defines second color for alternating table row colors
