Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorjustnajm
    • CommentTimeDec 30th 2006
     
    hi,

    I have table name user with column lastname & firstname. I have to pic the record of a user who has a herarchery in the table.

    like I know the name of Jhon but don't know his father name and want to know his grandfather name.

    lastname | firstname
    |
    Jhon | Lobo
    Lobo | Peter


    $query="Select lastname from users where firstname='(select lastname from user where firstname='peter')'";

    but in this query have some error, thats why not retrieving the record.