'How to add plus(+) sign in every row of a column using SQL query?

I have a database with a column containing phone numbers. I want to add plus(+) sign in the beginning of every phone number.

UPDATE Table 
SET Phone = CONCAT('+', Phone)

This is the query I'm using to insert any other character, but it doesn't seem to work with + sign. It says 0 row(s) affected Rows matched: 4023 Changed: 0 Warnings: 0, which means nothing has changed.

Even if I do SET Phone = CONCAT('+91', Phone), only 91 is being inserted and not the plus sign.



Solution 1:[1]

The attach method takes a filename for the file to attach, not data. You are probably looking for the attachData method:

public function attachData($data, $name, array $options = [])

To switch to attachData:

->attachData($file, 'factuur.pdf', ['mime' => 'application/pdf'])

Laravel 8.x Docs - Mail - Attachments - Raw Data Attachments attachData

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 lagbox