Hi,
Using this i can get specified no of columns,but using this is it
possible to access method of class of that table or not.
Thanks,
Kusum
On Mar 25, 11:37 pm, Sid Bachtiar <[email protected]> wrote:
> You said:
>
> >> > > I want to select data from a table list.I want to select all rows
> >> > > and only one column from this table
>
> If you want objects, you have to select all columns, not just one.
>
>
>
> On Wed, Mar 25, 2009 at 11:34 PM,kusum<[email protected]> wrote:
>
> > Hi,
> > This will give me a resultset object not array of objects of that
> > table.I want to get array of objects of that table, so i can use
> > methods of that class.Is it possible.
>
> > Thanks,
> >Kusum
>
> > On Mar 24, 4:48 pm, Dheeraj Kumar Aggarwal <[email protected]>
> > wrote:
> >> hi
>
> >> if you are using Propel1.3 then try this because Propel 1.3 now works on
> >> PDO
>
> >> $c = new Criteria();
> >> .
> >> .
> >> .
> >> .
> >> $c->clearSelectColumns();
> >> $c->addSelectColumn(SomePeer::SOME_COLUMN);
> >> $stmt = MyModelPeer::doSelectStmt($c);
> >> $results = array();
> >> while($row = $stmt->fetch(PDO::FETCH_NUM))
> >> {
> >> $result[ ] = $stmt->fetchColumn(0);
>
> >> }
>
> >> hope this should work for u........
>
> >> On Tue, Mar 24, 2009 at 4:57 PM, Sid Bachtiar
> >> <[email protected]>wrote:
>
> >> > Try something like this:
>
> >> > $c = new Criteria();
>
> >> > $c->clearSelectColumns();
> >> > $c->addSelectColumn(SomePeer::SOME_COLUMN);
>
> >> > $rs = MyModelPeer::doSelectRS($c);
>
> >> > while ($rs->next())
> >> > {
> >> > echo $rs->get(0); // value of SOME_COLUMN
> >> > }
>
> >> > On Tue, Mar 24, 2009 at 11:51 PM,kusum<[email protected]> wrote:
>
> >> > > Hi,
> >> > > I want to select data from a table list.I want to select all rows
> >> > > and only one column from this table using symfony api method.How we
> >> > > can select only one column.
>
> >> > > Thanks,
> >> > >Kusum
>
> >> > --
> >> > Blue Horn Ltd - System Development
> >> >http://bluehorn.co.nz
>
> >> --
> >> Regards,
> >> Dheeraj
>
> --
> Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---