Can anyone tell me what's wrong with this query? When executed nothing is found/replaced.
This is part of our internal script to fix some quotes on the forums.
When manually executed via myAdmin it works perfectly.
Example: UPDATE xf_post SET message = REPLACE(message, 'post: 317', 'post: 126');
But with variables in PHP it won't find/replace anything.
Thanks in advance.
PHP:
foreach($query AS $rowName => $results)
{
$db->query(" UPDATE xf_post SET message = REPLACE(message, 'post: {$results[post_id]}', 'post: {$results[future_id]}') ");
}
This is part of our internal script to fix some quotes on the forums.
When manually executed via myAdmin it works perfectly.
Example: UPDATE xf_post SET message = REPLACE(message, 'post: 317', 'post: 126');
But with variables in PHP it won't find/replace anything.
Thanks in advance.