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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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 becomeswhere p.slug = 'doctrine-released'