php man page for dbase_replace_record

Query: dbase_replace_record

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

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
cap_mkdb(1) - mojave
dbase_get_header_info(3) - php
dbase_open(3) - php
fbsql_data_seek(3) - php
px_insert_record(3) - php
Similar Topics in the Unix Linux Community
Date conversion in row while preserving rest of fields
Search and Replace by record position
Retrieve data from one file comparing the ID in the second file
Multiple records need to convert UNIXtime to human readable datatime and all output in one format
Replace a string for every record after the 1st record