• I am editing a sql statement. I have successfully added the new fields I want but upon display any line feed characters etc I use are either ignored or displayed literally.

    The plugin developer has put my “requirement” on a wish list but rather than holding my breath and having a modicum of sql I did it myself.

    below is a pseudo statement showing what I have tried and either they show literally or do nothing.

    SELECT CustomerName, char(10), “\n”, “<br>”, CONCAT(Address, “\n”, PostalCode, “char(10)”, City) AS Address
    FROM Customers;

    I guess this depends upon how the plugin “translates” the sql for display but I haven’t got to that part in the book yet 🙂 Any ideas? Apart from hire a developer that is, how else does one learn..

Viewing 1 replies (of 1 total)
  • The SQL statement just gets the data from the database. How that data is used and displayed is totally separate. You should focus on the display, as that is what your question is about.
    But know that in HTML, every tag has a default context. It’s either inline (like text and images) or block. The browser will condense white space to follow these contexts, so a new-line is the same as a space. You can use CSS to change the contexts (display property and width).

Viewing 1 replies (of 1 total)
  • The topic ‘Inserting line feed in sql’ is closed to new replies.