1. Home
  2. Docs
  3. Function Reference
  4. Functions
  5. bind()

bind()

Bind posted data keys with table field names.

Copy to Clipboard

Parameters

$table

Target table (without table_prefix)

$data

Data to save, in $_POST format

$to_lower

If true, change keys to lowercase (default true)

$can_echo_query

If true the query will be echoed out (default false)

Return

mixed

Returns false if failed, otherwise returns the array

Example

Copy to Clipboard

The above example will remove “wrong_column”, and keep the keys existing in the target table, return them in an associated array.

Copy to Clipboard
Tags