dbase_replace_record(3) php man page | unix.com

Man Page: dbase_replace_record

Operating Environment: php

Section: 3

DBASE_REPLACE_RECORD(3) 						 1						   DBASE_REPLACE_RECORD(3)

dbase_replace_record - Replaces a record in a database

SYNOPSIS
bool dbase_replace_record (int $dbase_identifier, array $record, int $record_number)
DESCRIPTION
Replaces the given record in the database with the given data.
PARAMETERS
o $dbase_identifier - The database link identifier, returned by dbase_open(3) or dbase_create(3). o $record - An indexed array of data. The number of items must be equal to the number of fields in the database, otherwise dbase_replace_record(3) will fail. Note If you're using dbase_get_record(3) return value for this parameter, remember to reset the key named deleted. o $record_number - An integer which spans from 1 to the number of records in the database (as returned by dbase_numrecords(3)).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 Updating a record in the database <?php // open in read-write mode $db = dbase_open('/tmp/test.dbf', 2); if ($db) { // gets the old row $row = dbase_get_record_with_names($db, 1); // remove the 'deleted' entry unset($row['deleted']); // Update the date field with the current timestamp $row['date'] = date('Ymd'); // Replace the record dbase_replace_record($db, $row, 1); dbase_close($db); } ?>
SEE ALSO
dbase_add_record(3), dbase_delete_record(3). PHP Documentation Group DBASE_REPLACE_RECORD(3)
Related Man Pages
px_retrieve_record(3) - php
dbase_open(3) - php
fbsql_data_seek(3) - php
mssql_fetch_row(3) - php
px_insert_record(3) - php
Similar Topics in the Unix Linux Community
How to insert data befor some field in a row of data depending up on values in row
Recursive function in unix
To find the Ip address of the user who deleted files
How to compare current record,with next and previous record in awk without using array?
Replace a string for every record after the 1st record