I am running this query
$query = "update my_cloud set full_dir_url = replace(full_dir_url, '$findWhat', '$replaceWith') where full_dir_url like '$findWhat/%' or where full_dir_url = '$findWhat' ";
DB::raw($query);
echo $query;
Output of echo $query
is
update my_cloud set full_dir_url = replace(full_dir_url, '/1st Year/Slide', '/1st Year/Slides') where full_dir_url like '/1st Year/Slide/%' or where full_dir_url = '/1st Year/Slide'
When I run this query in phpmyadmin sql editor, data is updated as expected.
But that DB::raw($query)
doesn't update any data. No error log either.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire