i wonder what this query means:
$blogPost = Doctrine_Query::create()->from('BlogPost p')->where('p.slug = ?', 'doctrine-released')->execute();
could someone explain the ? for me?
thanks
i wonder what this query means:
$blogPost = Doctrine_Query::create()->from('BlogPost p')->where('p.slug = ?', 'doctrine-released')->execute();
could someone explain the ? for me?
thanks
I am guessing, but I would bet money that the ?
is just a way of saying 'there is a variable here and I will later populate it', just like normal binding in other SQL varieties. In your example, that would imply that the ?
is expanded to 'doctrine-released' at execute time. In other words, the query becomes where p.slug = 'doctrine-released'