In the modules actions, what is the best way to select records based on an index other than the primary key id?
$this->city = Doctrine::getTable('City')->find(array($request->getParameter('city')));
This always returns a query with WHERE City.id= instead of WHERE City.city=
Do I have to do something like
$q = Doctrine_Query::create(...
Hey I have some problems creating my query into doctrine:
My sql query looks like this:
select *
from fs_employee
where role_id = ?
and
id not in
(select e.id
from fs_employee e, fs_plane p
where role_id = ?
and p.pilot_id = e.id
and e.player_id = ?
)
So bassicaly I want to select every pilot employee with role_id = 20 that has not b...
Hi,
i created this ticked some days ago.
http://trac.symfony-project.org/ticket/8922#preview
I'm interested in creating a patch (if possible). I dont have experience
debugging (just using var_dump). What should be my first step(s) ?
Javi
...
I have a simple site to develop and would like to learn PHP as I go. I want the site to be secure, scalable, and easy to maintain. Should I learn a framework and PHP simultaneously? If I build off of a framework there will be lots of unfamiliar code in play. Would you say this increases security risks?
...
Hello,
I have a form, and I want to pass it one parameter which must use to fill a widget.
I pass the parameter in my url :
url_for('myModule/new?parameter='.$myParam)
I have tried to take the parameter in my action and display it in my tamplate, but it doesn't work.
Action :
$this->param = $request->getParameter('parameter');
T...
I'm looking for a manual. But in the google only links from 2008 year and most of them didn't work.
...
What's the best practice for placement of functions that are used across multiple MVC layers?
I've recently had to write some statistics functions that are used both in the View and the Model. If I put them in a helper, I'm stuck loading helpers in the model layer, which is annoying, seems incorrect, and breaks completely when those fun...
I've installed sfGuard plugin and now most of old tests didn't work well. They need to be authenticated to the frontend system. Is there any official decision ?
...
I'm using symfony 1.4 and doctrine. I've spent the last couple days playing with my schema, and I've gotten it to load up / build / behave properly but only on my local machine. When I copy the files to an account on Dreamhost, change the configuration to allow a connection to that database (and nothing else) I get the following error tr...
Hi, I should to display datas from a rss file from another server.
When the rss file is on my server, I can read it, but when I try to read the same file on another server, I obtain this :
Warning:
simplexml_load_file(rssfile)
[function.simplexml-load-file]: failed
to open stream: Connection timed out
in
index.php
on lin...
Hello,
I have use a tutorial to make an input autocomplete with jQuery and ajax.
But when I write something in, the circle turns to show there is a request but the list with the choices isn't display. I have tried with an entry I know it must appear in the list.
My action :
public function executeMyAction(sfWebRequest $request) {
...
hi, i'm using symfony 1.4, and my schema is as follows:
Auditor: columns:
id:
type: integer
autoincrement: true
primary: true
username:
type: string(255)
password:
type: string(255)
fullname:
type: string(255)
is_auditor:
type: integer
is_manager:
type: integer
...
Hi, I'm new to Symfony and struggling to find an elegant solution for handling errors.
I know I can throw Exceptions and make my own Exception classes, but it's how to display the error to the user in the best possible fashion.
For example, I've got a Card class that charges credit and debit cards, there are a variety of different prob...
With Symfony 1.4's Forms, how can I throw a sfValidatorError in the post validator of an embedded form?
My parent form calls the following:
public function configure(){
$this->embedForm('page', $pageLinkForm);
}
And my embedded form:
public function configure(){
$this->validatorSchema->setPostValidator(new sfValidatorCallbac...
I have a two Symfony forms:
ShoppingListForm
ShoppingListItemForm
I'm embedding the ShoppingListItemForm inside the ShoppingListForm many times. ie A shopping list contains many items.
So the ShoppingListItemForm consists of two widgets:
item_id (checkbox)
shopping_list_id (hidden - foreign key)
What I would like to do is delete th...
Hi all,
I just joined a web dev project that uses Symfony 1.4 on CentOS 5.4 with MySQL. The server is down. My first task in the project is to get it back up. I don't know a lot about Symfony.
The Apache server log says
Access denied for user 'root'@'localhost' (using password: NO)
From all I can tell, the database access configuratio...
For schema.yml to work with relations, do you have to InnoDB? Here is my schema:
BuybackStatus:
connection: doctrine
tableName: buyback_statuses
columns:
id:
type: integer(4)
fixed: false
unsigned: true
primary: true
autoincrement: true
label:
type: string()
fixed: false
unsi...
We have a product developed in PHP Symfony framework. We have couple of clients right now for whom we are maintaining different code base and databases (MySql).
They access their respective code base using subdomain like client1.myproduct.com and client2.myproduct.com
Now we want to make a single code base for both the clients and onl...
I'm using Symfony for the first time, and on a project requiring the front end in two languages (currently). Although the i18n features of the framework have been fairly simple to get up and running, I'm hitting a problem with the website admin section. Here is a sample of the generator.xml for the 'Page' object:
config:
actions: ~
...
Hello,
I have an action with two requests on an unique table. The results of the requests must be different.
But, the result is the same for my two requests and it comes from my second request.
// Récupération du (ou des) locataire(s) actuel(s) du logement
$this->locataires = Doctrine_Query::create()
->from('logement l')...