Question: how can i query all records in mysql where field is not empty or null?

such as bellow, some products\_name is empty ,and some is null , how to get other has values records?
![enter image description here](https://i.stack.imgur.com/1LkXW.png)

```
-- ----------------------------
-- Table structure for `a`
-- ----------------------------
DROP TABLE IF EXISTS `a`;
CREATE TABLE `a` (
  `products_id` int(11) NOT NULL,
  `products_name` varchar(255) default NULL,
  PRIMARY KEY  (`products_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of a
-- ----------------------------
INSERT INTO `a` VALUES ('1', 'hello');
INSERT INTO `a` VALUES ('2', '222');
INSERT INTO `a` VALUES ('3', null);
INSERT INTO `a` VALUES ('4', '');
INSERT INTO `a` VALUES ('5', '5555');

```

Answer: 
The list multiplication does not clone (or create new) objects, but simply references the same (in your case mutable) object various times.

See here:

```
a = [[3]*3]*3
print(a)
a[0][1] = 1
print(a)

```
`grid = [[[0]*9]*9]*50` does not create 50 of 9x9 grid. When you state `[[[0]*9]*9]*50`, python creates 9 reference of `[0]`.

List multiplication only creates new references of the same object, in other words, every single list you made refer to the same place in the memory, used to store the `[0]` list.

[A similiar question](https://stackoverflow.com/questions/13058458/python-list-index).