How to fetch particular row in a table without mentioning it's id or other elements

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bala Kumaran
    New Member
    • Jan 2013
    • 30

    How to fetch particular row in a table without mentioning it's id or other elements

    Before to my question I want to say thanks to the admin of this website for very good support to improve my knowledge... :)

    Hello friends,
    How to fetch a data from a particular row in a column in the table without choosing its id or other headers of the columns

    For example:



    From the above table I want get the result as

    /* result start here */

    example3.com

    /* result end here */

    How should I want make the sql and php codes

    Please reply me friends...
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    a sql (select-)statement always starts with: SELECT

    after that you name the columns you want to see: domains

    than you say from which table you want the info:
    FROM domains

    as last part you can add a filter:
    WHERE domains = 'example3.com'


    There are some online courses on the internet, you can Google for them a, pretty quick you will find sites like this:
    SQLCourse.com is an interactive online training course for SQL beginners and advanced SQL programmers. Learn with our unique SQL tutorials today.

    ( i do not know this site, but it looks like its giving a sql course....)

    Comment

    • Bala Kumaran
      New Member
      • Jan 2013
      • 30

      #3
      thanks for ur reply,

      But, it cannot solution for my problem.

      The example1.com, example2.com, example3.com, ...

      are updated dynamically by the users of my website. So, I couldnot know the domain names listed in the column name "domains". How to get the result without mentioning example domains name?

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        That's impossible to do. You can't reference the id, you can't reference the name, you can't reference the domain. You have nothing left to identify what you want. How do you know which row and column to pull if you have nothing to identify it with?

        Comment

        Working...