Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a database that contains data and I want to display it, but I want this database have table rows which contains "0" and "#" and I want to display all the data but "0" and "#";

I'm asking if there is a function or class for that;

share|improve this question
1  
I have a database that contains data Most times they do ^^ – Bernhard Poiss 18 hours ago
SELECT * FROM youurtable WHERE yourcollumn NOT IN ('0', '#'); – Katona Szilárd-Zoltán 18 hours ago
Do you mean that some rows have exactly the value "0" or "#" in one column, or that "0" or "#" is a substring of the value? In any case, a simple SELECT ... WHERE ... query should probably do the trick. – Emil Lundberg 18 hours ago
Look, I've a product page that I show the data from the database, and I wan to show all the data from the database, and I want to see if there's some columns that have "0" or "#", to make theme not shown – Saif Lacrimosa 18 hours ago
Do you mean any column in that table is equal to those strings, or contains those strings? Voting to close, but this can be reopened if it is clarified. – halfer 17 hours ago
show 1 more comment

closed as not a real question by deceze, nickhar, halfer, Fabio, TheHippo 14 hours ago

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

up vote 0 down vote accepted

SELECT * FROM [table] WHERE [column] NOT IN ('0', '#');

share|improve this answer
the only probleme that I've is to show tha data I've already made my query and to shows the data I've "<p>labled</>".$rows[0].; but the problem with this query SELECT * FROM..... is the label hows can I hide the label with the row? – Saif Lacrimosa 17 hours ago
Not sure i understand, you want to display the field name and not the content? – Jacob Amerz 17 hours ago
not I want to display the field name and the content together if not, not together – Saif Lacrimosa 17 hours ago
Do you have a list of column names where it's possible to have values of # and 0 ? – Jacob Amerz 17 hours ago
no, that's what I'm looking for I want to retrieve the columns that possibly have # and 0 – Saif Lacrimosa 17 hours ago
show 1 more comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.