I l@ve RuBoard Previous Section Next Section

ccvs_lookup

string ccvs_lookup(string session, string status, int index) 

Looks up information about an item in the database.

Returns:

Invoice name or NONE on success; syntax error or uninitialized on error

Description:

ccvs_lookup() fetches and returns information about a transaction with the status given by status , which must be a valid CCVS status string. Since there may be many transactions with a given status at any one time, you use index to indicate which one you want. For instance, if you know there are several authorized but unprocessed transactions in the system and you want to find out the invoice name for the fifth one, you give a status of auth and an index of 5. Counting starts from 1. session must be a valid session ID as returned by ccvs_init().

If no matching transactions were found, NONE is returned.

Version:

PHP 4 since 4.0.2

Example:

Look up information on transactions
echo "Looking up a transaction's invoice name:\n"; 
$ret = ccvs_lookup($session, 'new', 1); 
echo "Returned: '$ret'; Return type: " . gettype($ret) . "\n"; 
echo "Textvalue: " . ccvs_textvalue($session) . "\n\n"; 
    I l@ve RuBoard Previous Section Next Section