downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

dbase_numrecords> <dbase_get_record
[edit] Last updated: Fri, 17 May 2013

view this page in

dbase_numfields

(PHP 4, PHP 5)

dbase_numfields Restituisce il numero di campi in un database dBase.

Descrizione

int dbase_numfields ( int $dbase_identifier )

Restituisce il numero di campi (colonne) nel databaase specificato. I numeri dei campi sono compresi tra 0 e dbase_numfields($db)-1, mentre i numeri dei records sono compresi tra 1 e dbase_numrecords($db).

Example #1 Usare dbase_numfields()

<?php

$rec 
dbase_get_record($db$recno);
$nf  dbase_numfields($db);
for (
$i=0$i $nf$i++) {
    echo 
$rec[$i]."<br>\n";
}
?>



add a note add a note User Contributed Notes dbase_numfields - [1 notes]
up
0
paul_andrec at hotmail dot com
3 years ago
When you want to add a record to a table you have to exclude the last row deleted.

So lets say your table have 10 rows with the deleted row to a total of 11.
you have to exclude the deleted row in your array();

sample:

table is :

<?php
 $row
($PID,$SID,$RID,$CON,$COM,$AD1,$AD2,$CIT,$STA,$ZIP,$deleted);
 
$record=array($PID,$SID,$RID,$CON,$COM,$AD1,$AD2,$CIT,$STA,$ZIP,);
 
$db = dbase_open($db_path_and_file,2);
 
dbase_add_record($db,$record );
 
dbase_close($db);
?>

This will work.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites