db.eq()

Syntax
long db.eq( long table_id [, long lock] )


Description
This reads from a specified table the record whose key value equals a certain predefined value. Before calling db.eq(), you must assign the required value to the key field. For example, the following code retrieves the item with item number 001 from the items table:


tiitm001.item = "001"
db.eq( ttiitm001 )


Arguments
table_id The table ID, as returned by db.bind().
lock By default, the record is not locked before reading. Use this optional argument to apply a lock to the record. The possible values are: 
  • DB.LOCK lock record for update
  • DB.DELAYED.LOCK apply a delayed lock to the record; the lock is                                                        applied immediately before the update action
Return values
     0 success
<>0 error


Related Post:

People who read this post also read :



0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More