Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 27th, 2003, 10:31 AM
Jester Jester is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: England
Posts: 271 Jester User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
SELECT field as a hyperlink - MySQL

Urghhh! Help!

I'm going around in circles here. I need to simply query a MySQL db using PHP and return one of the fields as a hyperlink. I've tried various things inc:

select '<a href="' + fieldname + '">Click Here!</a>' from table

and

SELECT (CONCAT('<a href="http://',fieldname,'">',fieldname,'</a>')) as hyperlink1 FROM table

These return just the text:
<a href="http://2">2</a>

with the source looking like this:

<a href="http://2">2</a>

How can I stop the php being parsed to html as exact characters (< instead of < etc) ???

Somebody save me from caffeine overdose!

J

Reply With Quote
  #2  
Old May 28th, 2003, 10:40 AM
Jester Jester is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: England
Posts: 271 Jester User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: SELECT field as a hyperlink - MySQL

Sorted it!

I was running the resulting sql through adodb pager (first time use): didn't realise there was the little command

php Code:
Original - php Code
  1.  
  2. $pager->htmlSpecialChars = false;


(sheepish grin)

Sorry for the noise,

J

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > SELECT field as a hyperlink - MySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway