Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    January 18th, 2005
    Location
    Georgia
    Posts
    125
    Question How to Alpha linked text using php?
    I want to alpha my affiliate links by the linked text, and cannot figure it out. When I use ORDER BY column_name it alpha by all the goobly gook at the beginning of the aff link. Is there a way to do it by the text portion of the link.

    Yeah, I' m new but having a great time. I've figured out two codes today (and feeling pretty darn good about it), but got stuck on this.

    Any help would be appreciated.

    LeDonna

  2. #2
    Member
    Join Date
    January 18th, 2005
    Location
    Georgia
    Posts
    125
    Cool bump
    Okay, thought I'd see if I could bump this back onto the new post section for my eyeballs.

    LeDonna

  3. #3
    Member SeanW's Avatar
    Join Date
    July 28th, 2005
    Posts
    69
    Quote Originally Posted by justwright
    I want to alpha my affiliate links by the linked text, and cannot figure it out. When I use ORDER BY column_name it alpha by all the goobly gook at the beginning of the aff link. Is there a way to do it by the text portion of the link.
    You can ORDER BY a function, ie

    SELECT col FROM table ORDER BY substring(col, pos)

    now, which function to use, I'm not sure

    Sean

  4. #4
    Newbie
    Join Date
    January 18th, 2005
    Posts
    36
    depending on what is the goobly gook you can tell the query to sort by only the part of the column.

    something like this
    select column_name,function(columnname) as sorder from table order by sorder

    perheps if you post little bit of your column data it will be easyer to figure out the proper function.
    --------------------------------
    PHP & Mysql Support
    <a target="_blank" href="http://www.scriptresources.com/?abestweb">
    ScriptResources.com</a>

  5. #5
    Member
    Join Date
    January 18th, 2005
    Location
    Georgia
    Posts
    125
    I ended up making another column and separating the goobly gook from the achored text.

    LeDonna

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. PHP echo chunk of text
    By Uncle Rico in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: October 25th, 2007, 04:50 PM
  2. Title and linked text is key!
    By Cheesehead in forum Search Engine Optimization
    Replies: 4
    Last Post: January 5th, 2006, 06:12 PM
  3. php+text site
    By ttxxtt8 in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: August 11th, 2005, 11:45 AM
  4. Show Text One Time via PHP
    By AddHandler in forum Programming / Datafeeds / Tools
    Replies: 8
    Last Post: April 17th, 2005, 02:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •