How to get data from another mysql server?

Hello,

I have one form where I want to get data from another mysql server. Is that possible? If possible, can how tell me how?

Thanks

Just make a new CDbConnection class:

In your config file:


		'another_db'=>array(

			'connectionString' => 'mysql:host=...;dbname=...',

			'emulatePrepare' => true,

			'username' => '...',

			'password' => '...',

			'charset' => 'utf8',

			'class' => 'CDbConnection',

		),

And specify this db class in model.

Can you tell me how to use ip address in mysql:host=.

Thanks