Insert new record into table
Prototype:
This function insert the data of $record into table identified by $handle. Optional argument $is_varlen specify if record is varlen type.
Keys are created automatically by engine.
RETURN: number of new record inserted if all it's ok, else FALSE. For error information you can use mfcdb_error()
<?php $resource = mfcdb_open("mydatabase"); if($resource == FALSE) { die("An error occurred opening table, error is: ".mfcdb_error()."\n"); } $data = "42foobar"; $result = mfcdb_insert($resource, $data); if($result == FALSE) { echo "An error occurred while inserting record, error is: ".mfcdb_error()."\n"; } else { echo "Inserted record ".$result."\n"; } if(mfcdb_close($resource) == FALSE) { die("An error occurred closing table, error is: ".mfcdb_error()."\n"); } ?>