Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Database (dbm-style) Abstraction Layer Functions : dba_firstkey

dba_firstkey

Fetch first key (PHP 4, PHP 5)
string dba_firstkey ( resource handle )


Code Examples / Notes » dba_firstkey

psycho-logic

Looks like Jacky is using some DB object? I don't know if it's native to PHP or written on it's own... Anyways this is what I use:
$DBCon = dba_open("/tmp/test_db.db2", "r", "db2") or die("Uh oh, can't open the database :(");
if ($the_key = dba_firstkey($DBCon)) do {
print("Key: $the_key    Value:");
print dba_fetch($the_key, $DBCon);
print("
");
} while ($the_key = dba_nextkey($DBCon));
print ("
Well looks like we're done here :-)");


jacky dot jackyhung dot net

for ($key = dba_firstkey($this->handle); $key !== false; $key = dba_nextkey($this->handle)) {
$keyset[] = $key;
} // end for


Change Language


Follow Navioo On Twitter
dba_close
dba_delete
dba_exists
dba_fetch
dba_firstkey
dba_handlers
dba_insert
dba_key_split
dba_list
dba_nextkey
dba_open
dba_optimize
dba_popen
dba_replace
dba_sync
eXTReMe Tracker