Hi all,
When I was tiring to select using
$c = new Criteria();
$c->add(UserPeer::USERNAME, "Leo" );
$c->add(UserPeer::PASSWORD, "Marx" );
$results = UserPeer::doSelect( $c);
I got this error.
No dsn specified in your connection parameters for datasource [company]
I am attaching my config file with this.
thax
surej
As Propel 1.3 uses PDO you need to give the connection parameters as a
"DSN string".
see
http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/QuickStart#a4.SettingRuntimeConfiguration
or http://fi2.php.net/manual/en/ref.pdo.php#pdo.drivers
-veikko
_______________________________________________
users mailing list
us...@lists.agavi.org
http://lists.agavi.org/mailman/listinfo/users
http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/QuickStart#a4.SettingRuntimeConfiguration
or http://fi2.php.net/manual/en/ref.pdo.php#pdo.drivers
thax veikko
surej
sorry veikko
I have send u reply for the wrong stuff…here is my run runtime-conf.xml
<propel>
<datasources default= "company">
<datasource id ="company">
<!-- the Propel adapter (usually same as phptype of connection DSN) -->
<adapter>mysql </adapter>
<!-- Connection DSN. See PEAR DSN format for other supported parameters. -->
<connection>
<phptype>mysql </phptype>
<hostspec>localhost </hostspec>
<database>company </database>
<username>test </username>
<password>testpass </password>
</connection>
</datasource>
</datasources>
</propel>
Just go through
Thax
surej
myproject-conf.php is just runtime-conf.xml converted to an array so it
doesn't really matter which one you send.
But the answer you are looking for was in those two links I sent.
Use the runtime-conf.xml format showed here:
http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/QuickStart#a4.SettingRuntimeConfiguration
and the DSN string format for Mysql showed here:
http://www.php.net/manual/en/ref.pdo.php#pdo.drivers
or here: http://www.php.net/manual/en/ref.pdo-mysql.connection.php
$dsn = $conparams['dsn'];
if ($dsn === null) {
throw new PropelException('No dsn specified in your connection parameters for datasource ['.$name.']');
}
$user = isset($conparams['user']) ? $conparams['user'] : null
Hi Veikko,
Thanks for your support
The error was because of the wrong parameter in runtime-conf.xml.. For Propel was looking for user . But in config file it was username.
Sorry to trouble u
Looking for your support in future
Thanks once again
surej
$results
= UserPeer::doSelect(new Criteria());and resulted in a error
Fatal error: Unsupported operand types in D:\xampp\htdocs\login\app\modules\Default\models\GetAuthUserModel.class.php on line 19
How can i fetch complete record
thax
surej