Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //create record
- $rec = $fm->createRecord('layout_name', '$data_array');
- $result = $rec->commit();
- //new add command
- $newAdd = $fm->newAddCommand('layout_name', $data_array);
- $result = $newAdd->execute();
- //Second and main difference is what they return to $result variable. The 'createRecord()' statement returns an integer value to know the status of record creation process(whether succeed or failed). But the 'newAddCommand()' returns a bunch of information for the new created record along with record id.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement