PhpDig.net

What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.




hw_insertobject

Name

hw_insertobject — Inserts a new object of any kind into the server document hierarchy.

Synopsis

int hw_insertobject(hw_link, object_rec, parameters);
resource hw_link: Connection ID to Hyperwave server
string object_rec: Object record of the new object
string parameters: Parameters describing the new object

Returns

Object ID of the new object on success; FALSE on failure

Description

This function can be used to insert a new object of any valid Hyperwave object type into the Hyperwave document hierarchy. The object_rec parameter gives the attributes of the new object, and parameters gives extra information about the new object, such as where in the hierarchy to place it. The format for parameters is the same as that of an object record: a newline-delimited list of <key>=<value>pairs.

Version

PHP 3 since 3.0.3, PHP 4

Example

Example 511. Insert a new object

$obj_rec = "Type=Document\nDocumentType=text\nMimeType=text/plain\nTitle=en:Object Insertion Test";
$params = "Parent=0x2\nContent=This is the content of my new object";
if (($obj_id = hw_insertobject($hw_link, $obj_rec, $params)) === FALSE) {
    echo "Could not insert new object; reason: " . hw_errormsg($hw_link) . "\n";
} else {
    echo "New object created with ID '$obj_id'.\n";
}



PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.