From 30d75445d9624f204e29423e787945ac262a6c8f Mon Sep 17 00:00:00 2001 From: Shikiryu Date: Mon, 21 Oct 2019 09:40:05 +0200 Subject: [PATCH] --- Insert.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Insert.md diff --git a/Insert.md b/Insert.md new file mode 100644 index 0000000..6c51b1b --- /dev/null +++ b/Insert.md @@ -0,0 +1,22 @@ +There's 1 way to `Insert` items into the XMLDB: + +## Insert Items + +*Syntax:* `public function insertItem($id = null, $attributes = null, $childs = null, $table)` + +*Example:* + +```php +$xmldb = new XMLDB('db.xml'); +$xmldb->insertItem('test', array('name'=>'alright'), array('visibility'=>'true', 'x'=>'33'), 'table1') +``` + +This will insert the following item into _table1_ +`$id` can now be _null_ and *must* be _null_ if you use autoincrement. It will return `false` otherwise. + +```xml + + true + 33 + +``` \ No newline at end of file