Can you do this query/is there a better way of doing it?
#3

Adding a number to a column name is almost never a good idea. It usually signals poor database design.

If you want to select rows based on values in a list then you should the IN operator, e.g.
PHP код:
SELECT FROM table WHERE id IN(1357
Or even
PHP код:
SELECT FROM table WHERE someId IN(SELECT id FROM anotherTable WHERE foo bar
Reply


Messages In This Thread
Can you do this query/is there a better way of doing it? - by Dokins - 29.04.2017, 16:24
Re: Can you do this query/is there a better way of doing it? - by coool - 29.04.2017, 16:30
Re: Can you do this query/is there a better way of doing it? - by Vince - 29.04.2017, 16:32
Re: Can you do this query/is there a better way of doing it? - by Dokins - 29.04.2017, 16:33

Forum Jump:


Users browsing this thread: 2 Guest(s)