Select all where values equal 1?
It is the best way to select only records with "1" value? I cant make it
works :/
$results = mysqli_query($connecDB,"SELECT * FROM codes WHERE php = 1 AND
java = 1 AND ruby = 1 ORDER BY id ASC");
+------+----------------+---------+--------+--------+
| ID | CODES | PHP | RUBY | JAVA |
+------+----------------+---------+--------+--------+
| 1 | ford | 1 | 0 | 0 |
+------+----------------+---------+--------+--------+
| 2 | seat | 1 | 1 | 1 |
+------+----------------+---------+--------+--------+
| 3 | fiat | 1 | 1 | 0 |
+------+----------------+---------+--------+--------+
| 4 | toyota | 1 | 0 | 0 |
+------+----------------+---------+--------+--------+
| 5 | chevrolete | 1 | 0 | 1 |
+------+----------------+---------+--------+--------+
No comments:
Post a Comment