BLHTML.org

BLHTML.org / Web Programming / BLHTML / BLHTML Manual / BLHTML funktion list / BLHTML funktion list /

 
  FIELD 3497 0
#FIELD# is a database function
Rights to use this function #FIELD#:
  • Admin and lesser admins
  • Data manager, users can only read their own table

  • #FIELD# count / add up fields from the table

    values:  defaults:  description:
    idcurrent accountTable to be counted
    typecount
    sum
    avg
    first
    last
    min
    max
    rnd
    Counts the possitive numbers in fields from a table
    Sum of a field from a table
    The average of a field from a table
    Take out first key value and subtract sub=0
    Take out last key value and adding add=0
    Get the smallest number
    Get the biggest number
    Get a random field
    fieldkey fieldField to be treated
    whereSQL where expression
    decimal2type=avg Number of decimal places the answer must be presented with
    blhtmlblhtml=on BLHTML executes where
    returnreturn=variable stores the results in $variable

    Example:
    You have
    <b>#FIELD where(mailto = "#SYSTEM[myname]#" and grp = 1) blhtml=on#</b>
    unread mail in #SYSTEM[rubric]#
    of totaly #FIELD where(mailto = "#SYSTEM[myname]#") blhtml=on# mail<br><br>

    #FIELD
            type=sum
            field=income
            where(month=$month)
    #


    #FIELD id=13 type=last add=1#

    Returns:
    You have 1 unread mail in your inbox of totaly 8 mail

    The sum of all the fields where the field month equal to $month

    Get the last key value + 1 from table 13

    More information:
  • #READ#
  • basket
  • #BASKET#
  • #SQLGET#
  • BLHTML forum  


    apache MySQL PHP No to software patents! BLHTML
    © 2003, 2010 BLHTML
    This page is created with BLHTML in 0.0734 seconds