frequently asked questions

All your questions in one place.

Retrieve the content of a given non indexed field

This function returns the content of a given field from a given Table if a given value exists in a specified field.

Syntax:

GetValueSQL(<vValueToSearch>, <cFieldToSearch>, <cFieldToReturn>, cTableToSearch>)

 

ParameterDescription
vValueToSearchSpecifies the value to be searched for.
cFieldToSearchSpecifies the Field in which the value vValueToSearch has to be searched for.
cFieldToReturnSpecifies the field whose content has to be returned.
cTableToSearchSpecifies the table in which both the fields cFieldToSearch and cFieldToReturn are located.

Remark:

The syntax of this function is almost the same as GetValue.

 

The difference between these two functions consists in the fact that :

 

GetValueSQL() is faster than GetValue() if cFieldToSearch and cFieldToReturn are not both covered by indexes.

 

GetValue() is slightly faster than GetValueSQL() if cFieldToSearch and cFieldToReturn are both covered by indexes.

Example:

*/ Show the 1st address line for an address whose Company Name is "Company Name".

GetValueSQL("Company Name", "ad_societe", "ad_rue1", "adresses")

Did you find this article useful?

0 out of 0 found this helpful