LIMIT 22, 10
To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. This statement retrieves all rows from the 96th row to the last:SELECT * FROM tbl LIMIT 95,18446744073709551615;
@Autowired
private UserService service;
Can not set com.springapp.mvc.DAO.UserDaoImpl field com.springapp.mvc.Service.UserServiceImpl.userDaoImpl to com.sun.proxy.$Proxy37
select c.category_name, c.parent_Id, g.Id_goods, g.Goods_name, c.id_category
from goods as g
left join category as c on c.id_category = g.id_category
@InitBinder
public final void initBinder(WebDataBinder binder) {
binder.registerCustomEditor(Date.class, new UnixTimestampDateEditor(true));
}
import org.springframework.util.StringUtils;
import java.beans.PropertyEditorSupport;
import java.util.Date;
public class UnixTimestampDateEditor extends PropertyEditorSupport {
private boolean allowEmpty;
public UnixTimestampDateEditor(boolean allowEmpty) {
this.allowEmpty = allowEmpty;
}
public UnixTimestampDateEditor(boolean allowEmpty, Object source) {
super(source);
this.allowEmpty = allowEmpty;
}
@Override
public void setAsText(String text) throws IllegalArgumentException {
try {
if (this.allowEmpty && !StringUtils.hasText(text)) {
setValue(null);
} else {
long unixTimestamp = Long.parseLong(text);
if (unixTimestamp < 0) {
throw new IllegalArgumentException("argument < 0 ");
}
Date date = new Date(unixTimestamp * 1000);
setValue(date);
}
} catch (NumberFormatException pe) {
throw new IllegalArgumentException("Could not parse date: " + pe.getMessage(), pe);
}
}
}
DROP TABLE IF EXISTS `t_content`;
CREATE TABLE `t_content` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('blog','news','page') DEFAULT NULL,
`alias` varchar(255) DEFAULT NULL,
`title` varchar(555) DEFAULT NULL,
`content` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `t_content` WRITE;
/*!40000 ALTER TABLE `t_content` DISABLE KEYS */;
INSERT INTO `t_content` (`id`, `type`, `alias`, `title`, `content`)
VALUES
(1,'blog','eto_statia_bloga','Это статья блога','Контент'),
(2,'news','eto_novost','Это новость','Текст новости'),
(3,'page','kontacty','Контакты','Обычная страница, например с контактами');
/*!40000 ALTER TABLE `t_content` ENABLE KEYS */;
UNLOCK TABLES;
$rs="SELECT * FROM `pany` WHERE `link` <> '$link' LIMIT 1";
$rs="SELECT * FROM `pany` WHERE NOT `link` = '$link' LIMIT 1";