Cust_Id Name Phone -------------------------- A001 John 88888 A002 Smith 77777 A003 Stella 66666
Currently I'm executing 3 queries like: SELECT Name, Phone from tablename WHERE Cust_Id = 'A001'. and similarly for A002 & A003 The above query would return : $row[Name], $row[Phone].
Is there any way in which I can run a single query and get the results as: $row[A001][Phone] or I could reference the values directly.
The table has more than 3 tuples.
Any help would be appreciated.