I am very new to MYSQL and Prepared Statements. I have a few queries that I need to change to prepared statements. The problem is with this REGEXP query:
$objects = mysql_query("SELECT * FROM $table WHERE parent REGEXP ',".
$item .",|^". $item .",|,". $item ."\$|^".
$item ."\$'") or die(mysql_error());
How do you go about converting that to a prepared statement with place holders?
You should make use of the CONCAT function inside the prepared statement query instead of using the classic . concatenation sign for regular queries. This should do the trick :)