CI_Session::sess_regenerate()

sess_regenerate([$destroy = FALSE]) Parameters: $destroy (bool) – Whether to destroy session data Return type: void Regenerate session ID, optionally destroying the current session’s data. Note This method is just an alias for PHP’s native session_regenerate_id() function.

form_input()

form_input([$data = ''[, $value = ''[, $extra = '']]]) Parameters: $data (array) – Field attributes data $value (string) – Field value $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML text input field tag Return type: string Lets you generate a standard text input field. You can minimally pass the field name and value in the first and second parameter: echo form_input('username', 'johndoe'); Or you can pass an associ

CI_Image_lib::resize()

resize() Returns: TRUE on success, FALSE on failure Return type: bool The image resizing method lets you resize the original image, create a copy (with or without resizing), or create a thumbnail image. For practical purposes there is no difference between creating a copy and creating a thumbnail except a thumb will have the thumbnail marker as part of the name (i.e. mypic_thumb.jpg). All preferences listed in the Preferences table are available for this method except these three: rotation

Database Metadata

Table MetaData These functions let you fetch table information. List the Tables in Your Database $this->db->list_tables(); Returns an array containing the names of all the tables in the database you are currently connected to. Example: $tables = $this->db->list_tables(); foreach ($tables as $table) { echo $table; } Determine If a Table Exists $this->db->table_exists(); Sometimes it’s helpful to know whether a particular table exists before running an operation on it.

increment_string()

increment_string($str[, $separator = '_'[, $first = 1]]) Parameters: $str (string) – Input string $separator (string) – Separator to append a duplicate number with $first (int) – Starting number Returns: An incremented string Return type: string Increments a string by appending a number to it or increasing the number. Useful for creating “copies” or a file or duplicating database content which has unique titles or slugs. Usage example: echo increment_string('file', '_'); // "file_

CI_DB_query_builder::start_cache()

start_cache() Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Starts the Query Builder cache.

set_radio()

set_radio($field[, $value = ''[, $default = FALSE]]) Parameters: $field (string) – Field name $value (string) – Value to check for $default (string) – Whether the value is also a default one Returns: ‘checked’ attribute or an empty string Return type: string Permits you to display radio buttons in the state they were submitted. This function is identical to the set_checkbox() function above. Example: <input type="radio" name="myradio" value="1" <?php echo set_radio('myradio

CI_DB_result::result_array()

result_array() Returns: Array containing the fetched rows Return type: array Returns the query results as an array of rows, where each row is itself an associative array. Usage: see Result Arrays.

ul()

ul($list[, $attributes = '']) Parameters: $list (array) – List entries $attributes (array) – HTML attributes Returns: HTML-formatted unordered list Return type: string Permits you to generate unordered HTML lists from simple or multi-dimensional arrays. Example: $list = array( 'red', 'blue', 'green', 'yellow' ); $attributes = array( 'class' => 'boldlist', 'id' => 'mylist' ); echo ul($list, $attributes); The above code will

CI_DB_query_builder::limit()

limit($value[, $offset = 0]) Parameters: $value (int) – Number of rows to limit the results to $offset (int) – Number of rows to skip Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds LIMIT and OFFSET clauses to a query.