im using symfony with doctrine and zend.
i wonder if i wanna validate the user input data, should i use validation from symfony, zend or even doctrine?
i think i should go with symfony, but are there times the validation from zend or doctrine would be better?
thanks
...
i save a user like this in doctrine:
$user = User();
$user->name = 'peter';
$user->save();
is there a way to save 20 users in one sql query?
or do i have to loop the above code 20 times hence creating 20 sql queries?
thanks
...
i created a Doctrine_Query and executes it but i wanna know what params i can pass to it.
$q = Doctrine_Query::create()
->select('cl.id, cl.name')
->from('ContactList cl');
$contactLists = $q->execute($params, $hydrationMode);
from the api documentation:
execute($params = array(), $hydrationMode = null)
where do they tell ...
im using Doctrine and want to log all generated sql queries.
i know that i could use $q->getSqlQuery() but i dont want to do that manually each time.
is there a way to do it automatically?
thanks
...
Hello,
When I export my database with doctrine:data-dump, I encounter 2 problems:
* the primary keys are not exported
* instead of foreign keys columns correct name, it uses the name of the foreign table.
For example, here are my tables:
# schema.yml
Planet:
connection: doctrine
tableName: planet
columns:
planet_id:
ty...
Hi,
I'm trying to use an SQL query to get data from my database into the template of a symfony project.
my query:
SQL:
SELECT l.loc_id AS l__loc_id, l.naam AS l__naam, l.straat AS l__straat,
l.huisnummer AS l__huisnummer, l.plaats AS l__plaats, l.postcode AS l__postcode,
l.telefoon AS l__telefoon, l.opmerking AS l__opmerking, o.org_i...
im using doctrine and need to specify the length of a thread body (datatype: blob).
i wonder how many characters i should limit the user to type for a thread body?
what is normal?
thanks!
...
I'm working on my first Symfony project with Doctrine, and I've run into a hitch. I'm trying to express a game with two players. The relationship I want to have is PlayerOne and PlayerTwo each being keyed to an ID in the Users table. This is part of what I've got so far:
Game:
actAs: { Timestampable:- }
columns:
id: { type: i...
Is there a way in symfony to get from a doctrine nested set the whole path/route from a specified by id element to the root element in a Doctrine_Collection or array ?
...
Suppose I have two separate tables that I watch to query. Both of these tables has a relation with a third table. How can I query both tables with a single, non UNION based query?
Here's a theoretical example. I have a User table. That User can have both CDs and books. I want to find all of that user's books and CDs with a single query ...
Hello.
I got a script that create a new database, now I need to fill that database with tables and values (from a MySQL dump file).
I'm using PHP - Doctrine 1.2.
Here is how I create the database:
$manager = Doctrine_Manager::getInstance();
$newConn = $manager->openConnection($customer->Config->db_connection_string);
$newConn->c...
Using Symfony and Doctrine, I have a multi-select list box. The multiple default values need to be generated based on a Doctrine query.
$this->setWidgets(array(
'folders' => new sfWidgetFormDoctrineChoice(array(
'model' => 'FolderItem',
'order_by' => array('name', 'asc'),
'multiple' => true,
'query' => FolderItemTable...
Hi all!
I am facing a very weird problem with mysql and doctrine [with help of codeIgniter].
I am trying to make a simple migration script taking all records from one table and after a little process, saving them to another.
However, on my laptop [running windows and wamp] I get double numbers of the original table records to have bee...
I am developing a new application using Symfony. I want to store the passwords hashed, so I overridded the save method in my User model:
public function save(Doctrine_Connection $conn = null)
{
$this->setUserPassword( md5($this->getUserPassword()) );
return parent::save($conn);
}
This works good when a new user created. However, t...
I am making a Doctrine query and I have to do a wildcard match in the where clause. How should I escape the variable that I want to insert?
The query I want to get:
SELECT u.* FROM User as u WHERE name LIKE %var%
The php code until now:
$query = Doctrine_Query::create()
->from('User u')
->where();...
Hi,
How generate Doctrine Models from database on windows?
(I working with zend studio and zend framework)
...
Hello,
I have a CSV file will 3x10^6 rows, title and body mostly, the text
file has 3GB+.
Im a little scared of the fact that Seachable will almost duplicate
the data, can anyone please advise me on the advantages of searchable
over a mysql fulltext index on the title, body columns?
...
I need to edit primary keys in several tables.
By default, symfony hides primary keys in New/Edit forms.
For example, can't edit table 'Tags' with only field 'tag' which is PK.
Adding integer ID to this table is not exactly good db design.
Thanks in advance for your help.
...
Hi,
I have text in Turkish language: "selam günaydın". Doctrine
searchable converts it to keywords in table:
-selam
-guenaydin
So "guenaydin" was saved in table as keyword "günaydın" so when
somebody writes in search "günaydın" he gets nothing - what can I
do?
...
Hi,
I build zend app with doctrine.
The problem is when i add new tables to database and I should generate doctrine models, because I add my own code to Doctine generated classes- I dont wont to delete them.
I solve this problem like that:
1. copy old generated doctine models classes to other folder
2. generate doctrine models from datab...