My real estate table is : bds
Price filed is : bds_price `bds`.`bds_price`
I want to convert price number to price text, eg: 1,8 billion
I eidt hook but it does not work, please help, thanks:
function bds_init(&$options, $memberInfo, &$args){
// minhx https://bigprof.com/appgini/tips-and-tu ... sing-hooks
$old_options = $options->QueryFieldsTV;
foreach($old_options as $field => $caption){
/* Keep all fields as-is except for the phone field */
if($field == '`bds`.`bds_price`'){
/* Display only the first four digits of the phone field */
echo 'dasdasdasd';
$new_options["SUBSTRING(`bds`.`bds_price`, 1, 4)"] = '9999999999';
}else{
/* Keep all other fields as-is */
$new_options[$field] = $caption;
}
$options->QueryFieldsTV = $new_options;
}
return TRUE;
}
Table view to show Price text from price number
Re: Table view to show Price text from price number
$new_options["`bds`.`bds_price`"] = $caption;
i echo $caption but it show only 'bds_price' not its value'
how do i show its value
thanks
i echo $caption but it show only 'bds_price' not its value'
how do i show its value
thanks
Re: Table view to show Price text from price number
Hi,
you need to put the field to which you apply the change of the sqlquery.
$new_options["SUBSTRING(`bds`.`bds_price`, 1, 4)"] = '9999999999';
$new_options["SUBSTRING(`bds`.`bds_price`, 1, 4)"] = $caption;
you need to put the field to which you apply the change of the sqlquery.
$new_options["SUBSTRING(`bds`.`bds_price`, 1, 4)"] = '9999999999';
$new_options["SUBSTRING(`bds`.`bds_price`, 1, 4)"] = $caption;
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.