If I place text after the question mark in my Prepared Statement, will it cause any issues?
// Build query.
$q2 = 'SELECT m.first_name, c.created_on, c.body, c.status
FROM member AS m
INNER JOIN comment AS c
ON m.id = c.member_id
WHERE c.article_id=?[B] <font color='"#FF0000"'>AND c.status="Approved"';</font>[/B]
you're asking a php question in the mysql forum again
i would just sidestep the issue by coding it this way --
WHERE c.status="Approved" AND c.article_id=?';
Sure, why not be obvious?!
As Anthony said, no, it doesn't matter at all. After all, what if you have a prepared statement with two parameters? Then you'll always have text after the first question mark.
But did you not try to run the above query before asking your question here?
Yes I did.
(Doesn't mean what I did was correct.)
This topic is now closed. New replies are no longer allowed.