Re: [symfony-users] Build-model

2010-05-01 Thread Dheeraj Kumar Aggarwal
Hi it will only regenerate the files under the om folder of your model i.e. the base files will be regenerated. On Sun, May 2, 2010 at 10:29 AM, Parijat Kalia kaliapari...@gmail.comwrote: Ssup Guys, So a theoretical doubt.If I run, build-model individually, does it completely terminate all

Re: [symfony-users] symfony and hosting

2010-03-05 Thread Dheeraj Kumar Aggarwal
Hi set the documentRoot of your apache server upto your indepabis/web On Fri, Mar 5, 2010 at 8:08 PM, Germana Oliveira germanaolivei...@gmail.com wrote: Hi. I have an x10hosting.com acount, i already freeze my project and upload it to the server, in a directory with myProject name, but:

Re: [symfony-users] MVC - where to put complex application code in symfony

2010-02-02 Thread Dheeraj Kumar Aggarwal
hi According to your terminology, i think you have used Spring framework with hibernate in java or another framework In symfony, you first define your model layer schema in schema.yml then you can use propel or doctrine as a ORM to generate your model layer i have used Propel so in propel, it

Re: [symfony-users] What do you use symphony for?

2010-01-26 Thread Dheeraj Kumar Aggarwal
Hi ravi Symfony is a framework that will help to you properly organize your code in MVC (Model View Controller) style and provides features like routing, dispatching request, form handling and also integrates with other tools like propel or doctrine for ORM (Object relationship mapping). On Wed,

Re: [symfony-users] Re: Symfony Filter

2010-01-25 Thread Dheeraj Kumar Aggarwal
Hi in my view . if you place your filter below the security filter --- In security filter, symfony will check whether the user is logged in or not and if the user is not logged in, it will be redirected to home page as specified by yourself then again the whole cycle repeats but now the

Re: [symfony-users] model and function

2009-12-24 Thread Dheeraj Kumar Aggarwal
Hi $this-getEncounterInfo($value) here $this refers to your current action class object not the EyePhysicalExamination class object you should call this method on the object of EyePhysicalExamination instead of $this or if you don't want to call this on an object then define this function in

Re: [symfony-users] propel. how to retrieve

2009-12-01 Thread Dheeraj Kumar Aggarwal
hi for the first part, use this . $c = new Criteria(); $c-addJoin(ProductPeer::CATEGORY_ID, CategoryPeer::ID); $c-setDistinct(); $categories = CategoryPeer::doSelect($c); now the $categories variable contains the categories that have at least one product On Tue, Dec 1, 2009 at 5:58 AM,

[symfony-users] Re: got strange issue in symfony sessions (urgent)

2009-11-17 Thread Dheeraj Kumar Aggarwal
, and many server mean many php. If you use PHP sessions with more than 1 server, the user have a session only on one of them). My 2 cents. On Tue, Nov 17, 2009 at 5:27 AM, Dheeraj Kumar Aggarwal dheerajcom...@gmail.com wrote: i have got a strange issue in my symfony project when the user

Re: [symfony-users] Re: got strange issue in symfony sessions (urgent)

2009-11-17 Thread Dheeraj Kumar Aggarwal
on each, the shorter wins ... On 17 nov. 2009, at 05:27, Dheeraj Kumar Aggarwal wrote: i have got a strange issue in my symfony project when the user navigate through the site, sometimes symfony forwards the user to login page. although the user is already logged in. and when user

[symfony-users] got strange issue in symfony sessions (urgent)

2009-11-16 Thread Dheeraj Kumar Aggarwal
i have got a strange issue in my symfony project when the user navigate through the site, sometimes symfony forwards the user to login page. although the user is already logged in. and when user refreshes the screen after reaching on login screen it automatically goes into the site. the

[symfony-users] Re: simple one to many relationship

2009-10-01 Thread Dheeraj Kumar Aggarwal
hi i think, you have done something wrong in overriding the save function. firstly execute a raw query at the database client like mysql whatever your database is. your query will look like select * from comment where post_id = ?; if it returns something then you have done something wrong in

[symfony-users] Re: List of ebooks for symfony

2009-09-30 Thread Dheeraj Kumar Aggarwal
Hi documentation of symfony http://www.symfony-project.org/doc/1_2/ Symfony cheat sheets http://trac.symfony-project.org/wiki/CheatSheets On Tue, Sep 29, 2009 at 7:43 PM, Ehsan chavo...@gmail.com wrote: Hi all Please enter name and url of all ebooks you know about symfoby --

[symfony-users] Re: Open custom DB connection at runtime

2009-09-30 Thread Dheeraj Kumar Aggarwal
Hi May be, this helps i just googled it.. In propel, you can do this by creating a connection using Propel::setConnection(..); then pass this connection object to the model layer functions in the connection parameter On Wed, Sep 30, 2009 at 2:53 AM, Simone Fumagalli

[symfony-users] Re: Calling an action from other action

2009-08-27 Thread Dheeraj Kumar Aggarwal
hi u can use method getPresentationFor in your one of the actions class as $this-getController()-getPresentationFor($module_name, $method_name ); On Thu, Aug 27, 2009 at 4:41 AM, Jose R. Prieto joser.pri...@gmail.comwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I need to

[symfony-users] Re: Handling addJoin in Criteria

2009-08-09 Thread Dheeraj Kumar Aggarwal
hi you can use sfPropelCustomJoinHelper class to hydrate the related objects. On Sat, Aug 8, 2009 at 10:33 PM, Mo Mughrabi mo.mughr...@gmail.com wrote: Thanks, Gábor I still face the same problem, I mean in the template I don't know for sure how to retrieve records from other table without

[symfony-users] Re: String Variable to ClassName

2009-07-25 Thread Dheeraj Kumar Aggarwal
hi yes, you can definitely do this.. even if you want to reverse engineer your classes then you can also use Reflection classes of php have a look on this link http://in.php.net/oop5.reflection On Sun, Jul 26, 2009 at 2:46 AM, adrianrz adrianrz2...@hotmail.com wrote: Hello, I need to

[symfony-users] want to know the behaviour of send function of sfWebResponse class

2009-07-24 Thread Dheeraj Kumar Aggarwal
Hi all, i want to send response from filters, not from actions what i did is i just called sendResponse function in one of my filters the function is -- public static function sendResponse($response, $status_code, $content_type = 'text/plain', $content = null) {

[symfony-users] Re: want to know the behaviour of send function of sfWebResponse class

2009-07-24 Thread Dheeraj Kumar Aggarwal
, Eno symb...@gmail.com wrote: On Fri, 24 Jul 2009, Dheeraj Kumar Aggarwal wrote: i want to send response from filters, not from actions Why? i don't want any execution after calling send function So, how to do this Why? -- -- Regards, Dheeraj

[symfony-users] Re: please help, running a task from an action

2009-07-22 Thread Dheeraj Kumar Aggarwal
hi i have implemented a function to execute a task from action I have created a new instance of the sfFormatter class. // here class_name is the class name of the task to be executed public static function executeTask($class_name, $arguments = array(), $options = array()) { $dispatcher

[symfony-users] Re: custom related fields in the filters

2009-07-12 Thread Dheeraj Kumar Aggarwal
Hi create a filter in generator.yml as follows: filters: [Text] Now in Text.php file of model layer, add a __toString method as public function __toString() { return $this-getTitle(); } May be it helps. On Sun, Jul 12, 2009 at 8:37 PM, j_man evge...@gmail.com wrote: I spent a lot

[symfony-users] Re: Howto insert a ampersand into my database using a textarea from my backend app ?

2009-07-10 Thread Dheeraj Kumar Aggarwal
Hi use htmlentities() while displaying in the textarea. On Sat, Jul 11, 2009 at 1:48 AM, sd45sq5d5sqd nau...@gmail.com wrote: Comment mettre en base côté backend ces caractères ? * lt; - (lt = lower than = inférieur à = ) * gt; - (gt = greater than = supérieur à = ) * amp; -

[symfony-users] Re: Accessing ROOT_DIR from actions

2009-07-09 Thread Dheeraj Kumar Aggarwal
Hi i think you should try sfConfig::get('sf_root_dir') 2009/7/9 Reynier Pérez Mira rper...@uci.cu Hi every: It's possible access to SF_ROOT_DIR value from a actions wich not extends from sfProjectConfiguration? I try using sfProjectConfiguration::getRootDir() directly and I get this error:

[symfony-users] Re: Foreign-key to self in schema?

2009-06-15 Thread Dheeraj Kumar Aggarwal
hi yes you can self referencing tables in schema. On Mon, Jun 15, 2009 at 10:36 PM, Eno symb...@gmail.com wrote: Is it not possible to have a field reference another field as a foreign key? i.e. category: id:~ parent_id: { type: integer, foreignTable:

[symfony-users] Re: Problem with my-first-project tutorial (Symfony 1.2)

2009-06-09 Thread Dheeraj Kumar Aggarwal
Hi i think u should check your application's settings.yml for prod: .settings: no_script_name: off set the no_script_name to off in your prod environment settings. On Sat, Jun 6, 2009 at 3:55 AM, Fabu fabien.rassin...@gmail.com wrote: Hi, I would like to keep index.php when I

[symfony-users] Re: Couldn't locate driver named mysql

2009-06-09 Thread Dheeraj Kumar Aggarwal
Hi i don't know the solution of your problem . but may be it can be solved by restarting the apache. have you restart your apache after changing the php.ini file. because apache loads the configurations again untill it is restarted. On Wed, Jun 10, 2009 at 8:35 AM, Emily em...@armadillosoft.com

[symfony-users] Re: variables in layout.php?

2009-05-20 Thread Dheeraj Kumar Aggarwal
Hi Stephen, u can use $request-setAttribute('url','bla'); in your actions class and use it in layout by using $sf_request-getAttribute('url'); On Thu, May 21, 2009 at 7:04 AM, Stephen stephen.j.t...@gmail.com wrote: I define a variable in action: $this-url='bla'; I want to use this variable

[symfony-users] Re: How do you execute a sfTask by clicking on a link (do not want to use the CLI) ?

2009-05-06 Thread Dheeraj Kumar Aggarwal
Hi i also have the same problem i tried this solution but i get an error You must be in a symfony project directory. please help me to solve this error. On Thu, Apr 30, 2009 at 11:24 PM, Jonathan Wage jonw...@gmail.com wrote: $task = new sfTaskClassName(); $arguments = array(); $options =

[symfony-users] Re: How do you execute a sfTask by clicking on a link (do not want to use the CLI) ?

2009-05-06 Thread Dheeraj Kumar Aggarwal
(); Is there any bug, this is exactly what i have written. But it is giving me the error. *You must be in a symfony project directory.* I found no solution yet in symfony Thanks in advance. On Wed, May 6, 2009 at 8:52 PM, Dheeraj Kumar Aggarwal dheerajcom...@gmail.com wrote: Hi i also have the same

[symfony-users] Re: How do you execute a sfTask by clicking on a link (do not want to use the CLI) ?

2009-05-06 Thread Dheeraj Kumar Aggarwal
at 2:24 PM, Dheeraj Kumar Aggarwal dheerajcom...@gmail.com wrote: Hi all, Actually i want to run sfPropelBuildModelTask without using cli in my actions class What i have done exactly is $dispatcher = sfContext::getInstance()-getEventDispatcher(); $formatter = new sfFormatter(); $task

[symfony-users] Re: Use template in actions

2009-04-28 Thread Dheeraj Kumar Aggarwal
Hi u can use $this-getPartial('parial_name', array of arguments); On Tue, Apr 28, 2009 at 3:58 PM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: I want to send a HTML e-mail. For that, I think it's best to create a partial template. But the e-mail is being sent from the action, so

[symfony-users] Re: url_for in controller

2009-04-22 Thread Dheeraj Kumar Aggarwal
yes, you can use url_for helper in actions class by loading them in actions class by sfLoader::loadHelpers('Url'); On Wed, Apr 22, 2009 at 5:28 PM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Is there a way to use the url_for() (available in the template files) in my

[symfony-users] Re: Propel question: how to get AND instead of OR

2009-04-22 Thread Dheeraj Kumar Aggarwal
hi i think this should work $this-howManyToPage = 6; $c = new Criteria(); $criterion = $c-getNewCriterion(WeblogPeer::CATEGORY, 'general', Criteria::NOT_EQUAL); $criterion-addAnd($c-getNewCriterion(WeblogPeer::CATEGORY, 'featured', Criteria::NOT_EQUAL);); //

[symfony-users] Re: user-getFlash() when the flash contain html tag

2009-04-21 Thread Dheeraj Kumar Aggarwal
Hi Ahmed, At my side this is working i have used in actions class $msg = a href=\some-url\display msg/a; and then set the flash message by $this-getUser()-setFlash('msg', $msg); then i am retrieving it in templates as $sf_user-getFlash('msg'); and it is working fine. On Tue, Apr 21, 2009

[symfony-users] Re: blank screen of death: syntax errors not showing with custom controller using apache rewrite. Please help.

2009-04-16 Thread Dheeraj Kumar Aggarwal
in settings.yml error_reporting:?php echo ((E_ALL | E_STRICT) ^ E_NOTICE).\n ? On Thu, Apr 16, 2009 at 6:02 PM, Roland Cruse cruses...@gmail.com wrote: Thanks for the response. What is the error logging level set to in your environment? do you have show_errors set to on?

[symfony-users] Re: How can I use Ajax to validate user input?

2009-04-16 Thread Dheeraj Kumar Aggarwal
hi nothing special u have to do in ajax u can send an ajax request to server for user validation if not validated then send the error messages as response else send whatever your response 2009/4/16 Grus stephen.j.t...@gmail.com I read all documents about Form, but didnt find a solution. Could

[symfony-users] Re: Multiple actions, one template?

2009-04-16 Thread Dheeraj Kumar Aggarwal
hi you can do this by using $this-setTemplate('my'); in actions class On Thu, Apr 16, 2009 at 11:18 PM, Kevin Barsotti kevin.barso...@tribaldawn.com wrote: I'm working on making an existing module more efficient, and presently it has numerous (dozens) of actions which call upon an equal

[symfony-users] Re: Where in statement

2009-04-13 Thread Dheeraj Kumar Aggarwal
$c = new Criteria(); $c-addJoin(TransactionsPeer::ID,TicketPeer::TRANSACTION_ID); $c-add(TicketPeer::END_TIMESTAMP,NULL, Criteria::NOT_EQUAL); $c-clearSelectColumns(); $c-addSelectColumn(TransactionsPeer::ID); $c-addSelectColumn(TransactionsPeer::CREATED_AT); $rs =

[symfony-users] Re: Where in statement

2009-04-13 Thread Dheeraj Kumar Aggarwal
::CREATED_AT); $rs = TransactionsPeer::doSelectRS($c); while($rs-next()){ $id = $rs-getString(1); $created_at = $rs-getString(2); } On Tue, Apr 14, 2009 at 7:42 AM, Dheeraj Kumar Aggarwal dheerajcom...@gmail.com wrote: $c = new Criteria(); $c-addJoin(TransactionsPeer::ID,TicketPeer

[symfony-users] Re: Where in statement

2009-04-13 Thread Dheeraj Kumar Aggarwal
by the way you where in statement in propel can be written as $c-add(TicketPeer::TRANSACTION_ID,$ids, Criteria::IN); here $ids is array of transaction ids On Tue, Apr 14, 2009 at 7:26 AM, janlar...@gmail.com wrote: THIS THE OLD QUERY: select created_at, id from transactions

[symfony-users] Re: Where in statement

2009-04-13 Thread Dheeraj Kumar Aggarwal
$c = new Criteria(); $start_date= $this-date.' 12:00:00 AM '; $end_date= $this-endDate.' 11:59:59 PM'; $userid = $this-getLoggedInUser()-getID(); $c1 = $c-getNewCriterion(TransactionPeer::CREATED_AT, $start_date,Criteria::GREATER_EQUAL); $c2 =

[symfony-users] Re: Where in statement

2009-04-13 Thread Dheeraj Kumar Aggarwal
Please don't say me sir select created_at, id from transactions where id in (select transaction_id from ticket where end_timestamp != '') and created_at between '2009-01-01' and '2009-01-31' and user_id = '42' you can do this by simply joining two tables $c = new

[symfony-users] Re: could somebody give me some tutorial or tell how I can create my own error page ?

2009-04-02 Thread Dheeraj Kumar Aggarwal
hi simply copy the default directory into your modules directory $sf_symfony_lib_dir/controller/default/ then customize them according to you for more info: http://www.symfony-project.org/book/1_1/17-Extending-Symfony On Thu, Apr 2, 2009 at 5:35 PM, Sid Ferreira sid@gmail.com wrote:

[symfony-users] Re: Bypass template?

2009-03-31 Thread Dheeraj Kumar Aggarwal
Hi Smith, u can set your content type by $response-setContentType('text/csv'); //$response-setContentType('text/x-csv'); //$response-setContentType('application/csv'); $response-setHttpHeader('Content-Disposition', 'attachment; filename=' . $file_name); On Tue, Mar 31, 2009 at 5:16 PM, cokker

[symfony-users] Re: Mysql Restore Issue

2009-03-26 Thread Dheeraj Kumar Aggarwal
Hi Deepak, istead of taking of simple dump, u should again take a dump of rtdb1 with this option mysqldump -u-p--- -t-c database_name dump.sql -t -c options also maintains the headers of each table in the database then dump your dump file into your new database On Thu, Mar

[symfony-users] Re: Select a column

2009-03-24 Thread Dheeraj Kumar Aggarwal
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[

[symfony-users] Re: Propel vs. Doctrine - Pros and Cons

2009-03-24 Thread Dheeraj Kumar Aggarwal
Hi A comparison between LightORM, Propel and Doctrine is given at this link http://phplightorm.wiki.sourceforge.net/LightOrm+vs+Propel+vs+Doctrine+benchmark On Tue, Mar 24, 2009 at 6:28 PM, Campezzi campe...@gmail.com wrote: Hello there, I've been a PHP developer for some time now, and

[symfony-users] Re: constructor in symfony

2009-03-24 Thread Dheeraj Kumar Aggarwal
hi i think us should use the symfony preExecutehttp://www.symfony-project.org/api/1_2/sfAction#method_preexecute() function. Executes an application defined process prior to execution of this sfAction object. On Tue, Mar 24, 2009 at 8:41 PM, dziobacz aaabbbcccda...@gmail.com wrote: How can I

[symfony-users] Re: How to include partials from another module in the Admin Generator

2009-03-08 Thread Dheeraj Kumar Aggarwal
Hi u can directly include partial from another module like this e.g. Module Name: Hello partial name: message then include_partial(Hello/message,array(any arguments)); On Sun, Mar 8, 2009 at 2:46 PM, ssaboum ssab...@gmail.com wrote: Hi, i wanted to know how to include partials from

[symfony-users] Re: sql between statement

2009-03-04 Thread Dheeraj Kumar Aggarwal
hi u should try this $c = new Criteria(); $date1 = '2008-02-03';//-mm-dd $date2 = '2008-03-03'; // test against date1 $date1Criterion = $c-getNewCriterion(TransactionsPeer::START_DATE, $date1, Criteria::LESS_EQUAL); // test against date2 $date2Criterion =

[symfony-users] Re: Many to many and forms questions

2009-02-27 Thread Dheeraj Kumar Aggarwal
HI Chris, r u using Propel ? ok . if u r using propel then what u have to do is... u r having the job_id in $job_id $c = new Criteria(); $c-add(JobComponentPeer::JOB_ID,$job_id); $c-add(JobComponentPeer::COMPONENT_ID,ComponentPeer::ID); $components = ComponentPeer::doSelect($c); now all

[symfony-users] Re: Multiple foreign keys for the same table

2009-02-27 Thread Dheeraj Kumar Aggarwal
hi radu, i think this should work for you. $c = new Criteria(); // Create Aliasses $c-addAlias(U1, UsersPeer::TABLE_NAME); $c-addAlias(T3_2, UsersPeer::TABLE_NAME); // Create Joins $c-addJoin(ArticlePeer::CREATEDBY_ID, UsersPeer::alias(U1, UsersPeer::ID));

[symfony-users] Re: Multiple foreign keys for the same table

2009-02-27 Thread Dheeraj Kumar Aggarwal
)); On Sat, Feb 28, 2009 at 9:44 AM, Dheeraj Kumar Aggarwal dheerajcom...@gmail.com wrote: hi radu, i think this should work for you. $c = new Criteria(); // Create Aliasses $c-addAlias(U1, UsersPeer::TABLE_NAME); $c-addAlias(T3_2, UsersPeer::TABLE_NAME); // Create Joins $c