problem in code

Discussion in 'PHP' started by mahiraj, Nov 26, 2007.

  1. #1
    Hi All,

    I am storing the value of "fields" in a varialble $qry.
    $qry contains 3 fields such as 'lastname', 'firstname', 'rollno'

    now i am using the select query
    such as
    "select $qry form records"
    I am not getting any value.

    but when i am using * in place of $qry i am getting all values.

    please help me immediately
    thank you..
     
    mahiraj, Nov 26, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    There should be no single quotes around the filed names. Either nothing, or backticks. -> `
     
    nico_swd, Nov 26, 2007 IP