[symfony-users] Re: select FIELD from TABLE with propel

2009-03-08 Thread torso

Query works, thanks.

But now I get error when I am trying to use it on the object helper:
Call to a member function getPrimaryKey() on a non-object in
ObjectHelper.php on line 164

On Mar 8, 5:22 am, alvaro harryjek...@gmail.com wrote:
 $c = new Criteria();
 $c-clearSelectColumns();
 $c-addSelectColumn(MyPeer::MY_COLUMN):

 $rs = MyPeer::doSelectRS($c);
 On Mar 8, 2009, at 3:29 AM, torso wrote:



  Hi

  I how I do this query with propel, not raw sql query, but with
  cirteria. Select FLASH from FILES
  I need to get select options with flash file name.

  I have tried this:

  add to FilePeer with function name getSortedFlash:

  $c = new Criteria();
  $c-add($c-getColumnName(FilePeer::FLASH));
  $rs =File::DoSelect($c);

  this is for template:
  echo object_select_tag($file, 'getFileId',
  'peer_method=getSortedFlash')

  Thanks for your help
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: select FIELD from TABLE with propel

2009-03-08 Thread Sid Bachtiar

 But now I get error when I am trying to use it on the object helper:
 Call to a member function getPrimaryKey() on a non-object in
 ObjectHelper.php on line 164

What is the code you use?

On Sun, Mar 8, 2009 at 9:55 PM, torso petteri.torsso...@gmail.com wrote:

 Query works, thanks.

 But now I get error when I am trying to use it on the object helper:
 Call to a member function getPrimaryKey() on a non-object in
 ObjectHelper.php on line 164

 On Mar 8, 5:22 am, alvaro harryjek...@gmail.com wrote:
 $c = new Criteria();
 $c-clearSelectColumns();
 $c-addSelectColumn(MyPeer::MY_COLUMN):

 $rs = MyPeer::doSelectRS($c);
 On Mar 8, 2009, at 3:29 AM, torso wrote:



  Hi

  I how I do this query with propel, not raw sql query, but with
  cirteria. Select FLASH from FILES
  I need to get select options with flash file name.

  I have tried this:

  add to FilePeer with function name getSortedFlash:

  $c = new Criteria();
  $c-add($c-getColumnName(FilePeer::FLASH));
  $rs =File::DoSelect($c);

  this is for template:
  echo object_select_tag($file, 'getFileId',
  'peer_method=getSortedFlash')

  Thanks for your help
 




-- 
Blue Horn Ltd - System Development
http://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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: select FIELD from TABLE with propel

2009-03-08 Thread torso

this is in the template which makes that error:
echo object_select_tag($file, 'getFileId',
'peer_method=getSortedFlash')

and this is the query for getSortedFlash:
$c = new Criteria();
$c-clearSelectColumns();
$c-addSelectColumn(FILE::FLASH):
$rs = FILEPeer::doSelectRS($c);


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: select FIELD from TABLE with propel

2009-03-08 Thread alvaro

This code won't return a propel populated object.

It will return a propel resultset.

Read the manual or the Resultset interface inside propel, or this  
article may help:

http://www.thenetcircle.com/blog/2009/02/10/propel-query-optimization-tips/

Cheers,

Alvaro


On Mar 8, 2009, at 5:31 PM, torso wrote:


 this is in the template which makes that error:
 echo object_select_tag($file, 'getFileId',
 'peer_method=getSortedFlash')

 and this is the query for getSortedFlash:
 $c = new Criteria();
 $c-clearSelectColumns();
 $c-addSelectColumn(FILE::FLASH):
 $rs = FILEPeer::doSelectRS($c);


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: select FIELD from TABLE with propel

2009-03-07 Thread alvaro

$c = new Criteria();
$c-clearSelectColumns();
$c-addSelectColumn(MyPeer::MY_COLUMN):

$rs = MyPeer::doSelectRS($c);
On Mar 8, 2009, at 3:29 AM, torso wrote:


 Hi

 I how I do this query with propel, not raw sql query, but with
 cirteria. Select FLASH from FILES
 I need to get select options with flash file name.

 I have tried this:

 add to FilePeer with function name getSortedFlash:

 $c = new Criteria();
 $c-add($c-getColumnName(FilePeer::FLASH));
 $rs =File::DoSelect($c);

 this is for template:
 echo object_select_tag($file, 'getFileId',
 'peer_method=getSortedFlash')

 Thanks for your help
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---