A
A
Alena2014-09-21 13:42:18
MySQL
Alena, 2014-09-21 13:42:18

How to properly compose an IF query in MySql?

Good day!
Tell me how you can compose - "If the given value is <2, then I display the values ​​\u200b\u200bcorresponding to this condition
"

select COUNT('object_id') FROM dynamic_field_value as count GROUP BY object_id

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kmx, 2014-09-21
@kmx

$a = mysql_query('select COUNT('object_id') FROM dynamic_field_value as count GROUP BY object_id');
if($a < 2) {
echo 'bla bla bla';
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question