A
A
Alexander2015-09-18 09:46:20
MySQL
Alexander, 2015-09-18 09:46:20

How to get data from one field?

"SELECT * FROM toys_config WHERE var='min_zakaz' AND var='min_zakaz_region'"
I can't get the data, if I specify this, then all the rules go to "SELECT * FROM toys_config WHERE var='min_zakaz'
and I need only one field and two records .

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ruslan Fedoseev, 2015-09-18
@kentuck1213

how can the same var be equal to two different values???

O
Optimus, 2015-09-18
Pyan @marrk2

"SELECT `pole` FROM `toys_config` WHERE `var`='min_zakaz' AND `var`='min_zakaz_region'"

A
Alex Safonov, 2015-09-18
@elevenelven

SELECT * FROM `toys_config` WHERE `var`='min_zakaz' OR var='min_zakaz_region';
SELECT * FROM `toys_config` WHERE `var` IN ( 'min_zakaz',  'min_zakaz_region' );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question