then connect database,but can't get the database value easy!?
 the program line like this:

$table="allone";
use DBI ;
$DSN = 'driver={SQL Server};Server=172.16.166.49;database=myweb;uid=sa;pwd=sa;';
$dbh  = DBI->connect("dbi:ODBC:$DSN") or die "$DBI::errstr\n";
$sth = $dbh -> prepare ("SELECT * from $table") or die "Cannot SELECT from '$table'" ;
$sth -> execute ;
$head = $sth ->{NAME} ;# here i get the title  value;
# but here....
for($i=0;$i<10;$i++){  # but here i did not see the first value ..
$dat = $sth -> fetchall_arrayref;
for($j=0;$j<10;$j++){
print "$dat->[$i][$j]";
}
}

# so how can i get the first value or the next and the last value on my mind?


                    ��
��

            lyf
            [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to