0

how do i select a row in a table columns i dont know the name of(and find the name of it)? but i know the cell/field of the column has a value of "55"
i also have to EXCLUDE ONE COLUMN that i know the name of.

does anyone know how to make the select statement that seleects all the columns with the value of 55. i only know the name of the column i want to exclude from the search.
?

Edited by SKANK!!!!!: n/a

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by SKANK!!!!!
-1

how do i select a row in a table columns i dont know the name of(and find the name of it)? but i know the cell/field of the column has a value of "55"
i also have to EXCLUDE ONE COLUMN that i know the name of.

does anyone know how to make the select statement that seleects all the columns with the value of 55. i only know the name of the column i want to exclude from the search.
?

I am not sure if I understood your question right. As far as I understand your question,
1. you can't select a record/row from the table without knowing the column you are querying on. You should know the column name.
ie.,

$query = "select * from locations where location_name = 'utopia'";

2. If you want to exclude a column from your retrieved result, use only those columns which you want to use. (This is helpful when you have huge queries and horrible execution time).
ie.,

$query = "select  country, pincode from locations where location_name='utopia'";
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.