giba Posted February 10, 2007 Share Posted February 10, 2007 Well, I was trying to create a link within a block of text with a query of mysql, but no sucessfully! When the query outputs the result (a text block) a link should be created in some words of this, something commonly done in a simple html page with the <a> tag [/color] I get no idea of how doing this when it comes from mysql. Please, help me! Quote Link to comment Share on other sites More sharing options...
effigy Posted February 10, 2007 Share Posted February 10, 2007 SELECT CONCAT('<a href="', url, '">', name, '< /a>') as link FROM table Quote Link to comment Share on other sites More sharing options...
giba Posted February 10, 2007 Author Share Posted February 10, 2007 GIBA REPLIES! I've tried SELECT CONCAT but didn't work. Let me explain my situation! I got three columns in my database: url (page.php) content (the text) comment (some explanation about the content) I would like to have this query: <a href="page.php">the text<//a>some explanation about the content My code for the query sinde then works, but I can't do the html element 'A' become a real link. 'Cos when it outputs the query that's not a link, that's a readable html. How do I first inform to mysql to parse this tags? Then, how do I output this html tag like a link to users! Quote Link to comment Share on other sites More sharing options...
fenway Posted February 11, 2007 Share Posted February 11, 2007 MySQL isn't going to parse anything... and concat has no choice but to work. Quote Link to comment Share on other sites More sharing options...
giba Posted February 14, 2007 Author Share Posted February 14, 2007 solved Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.