Good point Eduard!

 

I think this won’t be possible as the XML specification denies
number-only-tag-names.

Perhaps you must preprocess your XML file prior to throwing it into
Zend_Config. 

You won’t have this problem if you use INI-configuration-files – but I don’t
know if this would be a feasible solution for you.

 

[…]

db.params.driver_options.1002 = "SET NAMES utf8"

[…]

 

Best regards

 

Stefan

 

Von: Eduard Bareev [mailto:edu...@bareev.ru] 
Gesendet: Samstag, 28. März 2009 00:20
An: fw-general@lists.zend.com
Betreff: [fw-general] Zend_Config_Xml and PDO::MYSQL_ATTR_INIT_COMMAND

 

Hi, i am newbie here and i have some trouble:

I want to pass PDO::MYSQL_ATTR_INIT_COMMAND value to DB adatper. But how to
do this through Zend_Config_Xml ?

What is possible to use instead of PDO::MYSQL_ATTR_INIT_COMMAND in xml ? :)
And integer constant value (1002) is also not xml-copilant.

<?xml version="1.0" encoding="utf-8"?>
........
  <database>
    <connection>
      <adapter>pdo_mysql</adapter>
      <params>
        <host>192.168.1.177</host>
        <dbname>bbdo</dbname>
        <username>script</username>
        <password>script_stupid</password>
        <driver_options>
          <PDO::MYSQL_ATTR_INIT_COMMAND>SET NAMES
utf8</PDO::MYSQL_ATTR_INIT_COMMAND>
        </driver_options>
      </params>
    </connection>
  </database>
.........

Thank You!

Reply via email to