I have this code (symfony 1.0.16):

 

       $start_id = 5;

       $end_id = 10;

$c = new Criteria();

       $c->addAscendingOrderByColumn(VideoPeer::ID);

       $c->add(VideoPeer::ID, $start_id, Criteria::GREATER_EQUAL);

       $c->add(VideoPeer::ID, $end_id, Criteria::LESS_EQUAL); 

       

       echo $c->toString();

       exit;

 

I want to see what the actual SQL statement will look like for debugging
purposes. 

This is in a /site/batch/foo.php file, so I don't have the JS debug window
to use.

 

I searched through /usr/share/pear/symfony/vendor/propel/util/Criteria.php
and the only method I saw that looked useable was ->toString() however that
returns a nearly useless result:

 

Criteria:: 

Current Query SQL (may not be complete or applicable): SELECT  FROM video
WHERE video.ID<=? ORDER BY video.ID ASC

Parameters to replace: array (

 

(yes, it actually just ENDS like that with a single parenthesis. L )

 

Also, why doesn't it seem to be using the GREATER_EQUAL criteria??

 

I have no idea where to look for "Criteria" in here
http://www.symfony-project.org/api/1_0/ 

Typing that word into the search box gives an error. *sigh*

 

 


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to