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.
?

Recommended Answers

All 3 Replies

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'";

oh yeah likke i had to change the columns with the rows. it was backwards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.