aql::update()

From SkyPHP

Jump to: navigation, search

aql | aql update |


Update a single record in the database.

Contents

Description

array update ( string $table, array $fields [, int $id [, boolean $silent_errors ] ] )
array update ( string $table, array $fields [, string $ide [, boolean $silent_errors ] ] )

Parameters

table - the name of the table in the database

fields - array of field name and value pairs to be inserted into the specified table

id - id of the record to update

ide - encrypted id of the record to update (see encrypt)

silent_errors - if true, returns an array of validation errors, otherwise output validation errors in html

Return Values

Returns a recordset array of the updated record.

Example

$artist = array(
    'name' => 'Pink Floyd',
    'url' => 'www.pinkfloyd.co.uk',
    'origin' => 'London, UK',
    'genre' => 'Psychedelic rock'
);
$rs = aql::update( 'artist', $artist, $artist_id );

See Also

Known Bugs & Issues

Personal tools