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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-09-2008, 10:56 PM
Junior Member
 
Join Date: Apr 2008
Posts: 4
Default query with 2 or more tables

I've created several classes by extending Zend_Db_Table_Abstract and I would like to get data out of 2 or more tables in 1 statement.

I know how to do this in SQL but I would like to know how to do this without using SQL and by using the classes that I've made.

Like this but then with 2 or more tables...

$table = new User();
$select = $table->select()->where('id_user = ?', $user);
$getUserDetails = $table->fetchRow($select);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 05:51 AM
Junior Member
 
Join Date: Mar 2008
Posts: 8
Default

You can make it by two ways first you can use select_api with joining Zend Framework: Documentation
Second way you can use Zend_Db_Table relationships which are much easier to use Zend Framework: Documentation
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-16-2008, 09:27 AM
Junior Member
 
Join Date: Apr 2008
Posts: 4
Default

Thx for the information! Solved my problem...
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 11:02 AM.