4

I am trying to do something like this:

<td>style="background:url('myimage.jpg') no-repeat;"> + column + </td>

But I get a MySQL error when trying:

Concat ('<td>style="background:url('myimage.jpg') no-repeat;">', info_text, '</td') as Nicetext

I suppose it is all the quotes that mess things up.

Thanks for all help!

user1768076
  • 369
  • 2
  • 5
  • 7

2 Answers2

6

Your strings include quote marks. You will have to escape them. Try something like:

Concat ('<td>style="background:url(\'myimage.jpg\') no-repeat;">', info_text, '</td') as Nicetext
SteveP
  • 18,840
  • 9
  • 47
  • 60
1

You haven't escaped the quotes. Try this :

Concat ('<td>style="background:url(\'myimage.jpg\') no-repeat;">', info_text, '</td') as Nicetext
Mohamed Amine
  • 2,264
  • 1
  • 23
  • 36