SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    3MTA3
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    1,016
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it possible to perform mysql function like this

    Is this possible to do somehow?
    $sql = "select * from table where LCASE(REPLACE(column_name, ' ', '-')) = '" . $_GET['query'] . "'";

  2. #2
    SitePoint Zealot
    Join Date
    Feb 2005
    Location
    UK
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What?? Do you mean that you want to transform an existing column name? Why?

  3. #3
    3MTA3
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    1,016
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't really want to, but was just curious if you could perform mysql functions on the column value in the database like that.

  4. #4
    SitePoint Zealot
    Join Date
    Feb 2005
    Location
    UK
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, but you could do it with PHP when you build the query.


Bookmarks

Posting Permissions

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