Re: DB_DataObject FormBuilder

From: Date: Sat, 06 Mar 2004 09:36:56 +0000
Subject: Re: DB_DataObject FormBuilder
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11125@lists.php.net to get a copy of this message
Hi David, I have never used DB_DataObject FormBuilder but maybe you could use the mysql function CONCAT within your SELECT query (if you use mysql, of course but there will be similar functions in other DBs)? Like that: SELECT table.ID, CONCAT(table.lastname, ' ', table.firstname) FROM ... Regards, Moritz David Thunman wrote:
Hello, After much work with the DB_DataObject FormBuilder class, I start to enjoy working with it. I see there are still many fixes to be made, but I like the feature of the related tables select menu creation so much I just can't go back to something else. Now I bumped in to a problem creating select menu items where I want the label text of an option to be built up from two different cell values in the related table. In my case they are "tablename.last_name" and "tablename.first_name" ehich I#d like to concatenate into one string. By default, I think, the formbuilder class uses the first collumn after the primary key from the related table to create the option label text(?). Is there an easy way to define this in an ini file or do I have to hack the formbuilder.class file to for this? Thanks, David Thunman


« previous php.pear.general (#11125) next »