06-13-2010, 09:19 PM
|
#3 (permalink)
|
|
The Contributor
Join Date: May 2008
Location: Oporto-Portugal
Posts: 32
Thanks: 11
|
Hi VI,
From the main program I want to the following:
$customer = new record();
$customer_name = $customer->scr_name_customer;
$customer_email = $customer->scr_email_customer;
$customer_phone = $customer->scr_tele_customer;
$customer_fax = $customer->scr_fax_customer;
$customer_vat = $customer->scr_vat_customer;
On the record class I retrieve one variable called stringfieldname when I wanted to have all the different fields of the table on different variable names such as scr_name_customer, scr_email_customer, etc....
That's why I was using the $this->$stringfieldname =..., I had this variable inside a cycle varying, obtaining this way $this->scr_name_customer=..., $this->scr_email_customer=..., $this->scr_tele_customer=..., etc
I also tried another way which was inside this cycle to have a variable called "fieldname" with the variable names (this->scr_name_customer, this->scr_email_customer, this->scr_tele_customer=... and then use:
$$fieldname=....
But also did not work
I hope this clears Your doubts VI, I really need some help here.
I am starting to think that it will not be possible because I tried so many things. I have spent many hours here already.
Thanks in advance,
PP
Last edited by pipesportugal : 06-13-2010 at 09:21 PM.
Reason: mistake
|
|
|
|