[SOLVED] Cannot insert string with space into postgreSQL database table


I am using PDO to insert values into postgreSQL database. I am trying to insert the path of a file into the table. The problem is that when the file name contains space then it is inserting the partial file name upto the space.

Below is the code.

$command = Yii::app()->db->createCommand("select * from sp_email_attachment_insert(:message_id,:attachment_url);");




Please help. Thanks in advance.

Have you tried to use this instead of createCommand?

$model = Model::model()->findAll();

Sorry. Problem was with the jQuery that displayed the attachment.