Stephen's dev blog

Posts Tagged ‘propel

Custom SQL in symfony 1.2.3

Posted by: Stephen Gray on: 29 June, 2009

Quick one. A small snippet for performing custom SQL queries using symfony 1.2.3. The method to do this has varied slightly with the different symfony releases. The method found on the symfony site almost has a good example, this is just adding a bit to it (looping);
    $conn = Propel::getConnection();
    $query = ‘SELECT * FROM `my_table`;’;

    $statement = [...]

Symfony “Database “” does not exist.” error

Posted by: Stephen Gray on: 2 March, 2009

Hello,
It’s definitely been too long since I posted here! I will try and post more regularly over the coming months…
Firstly, we came across this issue after writing a number of plugins for a symfony project. Each of these plugins had their own schema.yml files and therefore we didn’t need our own custom schema.yml file at [...]

I’ve just made a change to a symfony project’s schema.yml file and tried to rebuild the model and came across this error message:
Unable to parse default value as date/time value: ‘0000-00-00 00:00:00′
Which was stopping the build. After looking at various places, it seems this is a problem with Creole, (propel’s DBAL).
Before PHP v5.2.4, you could [...]