Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-03-2008, 09:08 PM
Junior Member
 
Join Date: Apr 2008
Posts: 1
Default Zend_Db_Select with column prefixes

Hi there,

iam searching for a convenient way to select all fields from 2 small tables and get the result columns prefixed with their tablenames without specifiyng an alias for each column.

e.g.

Code:
		$select = $db->select()
							->from("book" )
							->from("publisher" )
							->where("book.publisher_id = publisher.id")
							->where("book.id = ?", $id );
the table book and also the table publisher have the following fields in common:
- title
- created
- changed
- created_by

so the resultset will contain for e.g. only the field "title" and it contains the title from book or the title from publisher.

is there a way to get the resultset back that it is prefixed with their tables )without specifiying all aliasses)?
like
book.title
publisher.title

regards
Treeda
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:55 AM.