CI_DB_query_builder::set_update_batch()

set_update_batch($key[, $value = ''[, $escape = NULL]]) Parameters: $key (mixed) – Field name or an array of field/value pairs $value (string) – Field value, if $key is a single field $escape (bool) – Whether to escape values and identifiers Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds field/value pairs to be updated in a table later via update_batch().

Conclusion

This tutorial did not cover all of the things you might expect of a full-fledged content management system, but it introduced you to the more important topics of routing, writing controllers, and models. We hope this tutorial gave you an insight into some of CodeIgniter’s basic design patterns, which you can expand upon. Now that you’ve completed this tutorial, we recommend you check out the rest of the documentation. CodeIgniter is often praised because of its comprehensive documentation. Use

CI_Session::mark_as_flash()

mark_as_flash($key) Parameters: $key (mixed) – Key to mark as flashdata, or an array of multiple keys Returns: TRUE on success, FALSE on failure Return type: bool Marks a $_SESSION item key (or multiple ones) as “flashdata”.

is_countable()

is_countable($word) Parameters: $word (string) – Input string Returns: TRUE if the word is countable or FALSE if not Return type: bool Checks if the given word has a plural version. Example: is_countable('equipment'); // Returns FALSE

CI_Session::tempdata()

tempdata([$key = NULL]) Parameters: $key (mixed) – Tempdata item key or NULL Returns: Value of the specified item key, or an array of all tempdata Return type: mixed Gets the value for a specific $_SESSION item that has been marked as “tempdata”, or an array of all “tempdata” items if no key was specified. Note This is a legacy method kept only for backwards compatibility with older applications. You should directly access $_SESSION instead.

CI_Loader::config()

config($file[, $use_sections = FALSE[, $fail_gracefully = FALSE]]) Parameters: $file (string) – Configuration file name $use_sections (bool) – Whether configuration values should be loaded into their own section $fail_gracefully (bool) – Whether to just return FALSE in case of failure Returns: TRUE on success, FALSE on failure Return type: bool This method is an alias of the config file loading method: $this->config->load()

CI_Session::has_userdata()

has_userdata($key) Parameters: $key (string) – Session item key Returns: TRUE if the specified key exists, FALSE if not Return type: bool Checks if an item exists in $_SESSION. Note This is a legacy method kept only for backwards compatibility with older applications. It is just an alias for isset($_SESSION[$key]) - please use that instead.

CI_Input::post()

post([$index = NULL[, $xss_clean = NULL]]) Parameters: $index (mixed) – POST parameter name $xss_clean (bool) – Whether to apply XSS filtering Returns: $_POST if no parameters supplied, otherwise the POST value if found or NULL if not Return type: mixed The first parameter will contain the name of the POST item you are looking for: $this->input->post('some_data'); The method returns NULL if the item you are attempting to retrieve does not exist. The second optional parameter

days_in_month()

days_in_month([$month = 0[, $year = '']]) Parameters: $month (int) – a numeric month $year (int) – a numeric year Returns: Count of days in the specified month Return type: int Returns the number of days in a given month/year. Takes leap years into account. Example: echo days_in_month(06, 2005); If the second parameter is empty, the current year will be used. Note This function will alias the native cal_days_in_month(), if it is available.

CI_Cart::get_item()

get_item($row_id) Parameters: $row_id (int) – Row ID to retrieve Returns: Array of item data Return type: array Returns an array containing data for the item matching the specified row ID, or FALSE if no such item exists.