ccvs_textvalueDescriptionccvs_textvalue() queries a CCVS session for information about the previous operation and returns that information in a consistently-formatted string. session must be a valid session ID as returned by ccvs_init() . The format of the returned string is key {value} key {value}., where key is the name of the particular type of information being returned, and value is the value of that piece of information. Some of the possible key names are shown in the following list, along with the type of information each key name contains. Note that these are returned only in contexts within which they make sense. Any of the CCVS status strings can serve as a key name; for instance, ccvs_count() uses the status strings as key names.
ExampleExample 98. Get additional information from a session /* The output from this script using the CCVS demo installation: * * Adding an invoice to the session: * Looking up the transaction's status: * Returned: 'new'; Return type: string * Textvalue: status {new} invoice {FOOXXXXX} amount {0.00} newtime {Fri Apr 27 15:18:29 2001} */ $session = ccvs_init('ccvs'); echo "Adding an invoice to the session:\n"; if (!ccvs_new($session, 'foo') === 'OK') { echo "Could not create invoice; reason: " . ccvs_textvalue($session) . "\n"; } echo "Looking up the transaction's status:\n"; $ret = ccvs_status($session, 'foo'); echo "Returned: '$ret'; Return type: " . gettype($ret) . "\n"; echo "Textvalue: " . ccvs_textvalue($session) . "\n\n"; /* Just close the session since we're only testing. */ ccvs_done($session);
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.
|