Text after ? in Prepared Statement

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] [COLOR="#FF0000"]AND c.status="Approved"';[/COLOR][/B]



you’re asking a php question in the mysql forum again :wink:

i would just sidestep the issue by coding it this way –

WHERE c.status="Approved" AND c.article_id=?';

Sure, why not be obvious?! :stuck_out_tongue:



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? :slight_smile:

Yes I did.

(Doesn’t mean what I did was correct.)