Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 5

Displaying posts with tag: symfony (reset)

Symfony 2 and mysqlnd
Employee +0 Vote Up -0Vote Down

In a previous blog posting I was mentioning that I'm working on a small hobby PHP project. As I'm using this project to update myself to current frameworks I've decided to use Symfony2. Symfony provides a nice feature, which is the Symfony Profilier, an extensive logging and reporting system for Symfony2 developers to understand what's going on. A part of it is the Doctrine query logger which lists all database queries executed by Doctrine and their execution time.

This is nice but when we're using mysqlnd in our PHP build we have more information available. "So why not use that information," I thought and built

  [Read more...]
SQL Error with Symfony 1.4.4 and MySQL 5.5
+0 Vote Up -1Vote Down

I ran into an interesting bug/fact today while messing around with MySQL 5.5. It seems that in the DDL, you can’t say “Type=InnoDB|MyISAM|Foo” anymore. You have to say “Engine=InnoDB”.

This will break your propel:build-all , or propel:build-all-load .. or if you manually try to execute the sql from data/sql/*. You’ll get the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Type=InnoDB’

  [Read more...]
Changing MySQL storage engine for one table in your Propel/Symfony project
+0 Vote Up -0Vote Down

I need one MyISAM table in my schema, I’m using Symfony 1.2 and Propel 1.3. As flexible as Symfony and it’s YAML files are, Propel currently doesn’t allow you to change the storage engine on the fly. You use the storage engine as specified in propel.ini. As discussed in the Propel FAQ .

So, the next best thing to do now is to have it so that when Symfony runs propel:insert-sql, I can piggyback my own SQL to it. Luckily, this is possible, and it’s explained here

I now have my own SQL file running at the end, where I do an ALTER TABLE. For the lazy web.

1. Create your Alter table:


  [Read more...]
Talking to multiple databases with Symfony 1.2
+0 Vote Up -0Vote Down

Notes on using Symfony with multiple databases.

I’m building a new application in symfony, and I need to use some data from an existing application written by another developer.

I can’t just extend the existing application for reasons we don’t need to get into, but I do need to interface with the data, since the existing
app doesn’t really have a nice way to handle a SOA, or share data easily, my next best option is to talk to the original app’s db.

Things you need to think about.

  • No Hacks This is not a hack, symfony/propel support this out of the box, the documentation mentions it briefly but it’s definitely possible.
  • Permissions Should you share the same username/password? or different? In my case, I wanted to make sure symfony couldn’t write to the existing

  •   [Read more...]
    Symfony + MySQL to Django + PostgreSQL
    +0 Vote Up -0Vote Down

    While recently migrating from Symfony to Django plus changing the database backend from MySQL ( to PostgreSQL, there were mainly two tasks more time-consuming than I’ve had thought beforehand:

    SQL dump

    The old database used a latin1 encoding for the database fields and utf-8 as the server and client connection encoding. With these settings, even trying to get a correctly encoded database dump from phpMyAdmin is a bad idea.

    Using mysqldump with an explicitly specified character-set is much better:

    mysqldump ? ?default-character-set=latin1 ?skip-set-charset dbname >
      [Read more...]
    Showing entries 1 to 5

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.