Doctrine find() function is working but it is returning DQL first then the object. I don't want to display DQL

my code is

public function index() {

        $user = $this->doctrine->em->find('user\models\User', 1);

        echo '<br>';      

        echo $user->getName();
}

output is

SELECT t0.id AS id1, t0.name AS name2 FROM tbl_user t0 WHERE t0.id = ? array(1) { [0]=> int(1) } array(1) { [0]=> string(7) "integer" }

john

I have used CodeIgniter 2.2.2 and I have integrated doctrine using these steps link

Answers


I finally solved the problem. I had to comment the EchoSQLLogger() in Doctrine.php file in the libraries folder.

    // Set up logger
    //$logger = new EchoSQLLogger;
    //$config->setSQLLogger($logger);

Need Your Help

Reading a Map from properties file and load with spring annotation @Value

java spring

I have a list of (key/value) need to be populated to a map on a spring bean:

How to debug a C# .Net application in VS2010 that is started from another process

c# .net visual-studio-2010 debugging

I have a .net GUI application written in c# and a pdf printer. The pdf printer has a field where you can set a command to start an external application. In this case i can print a document with this

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.