MySql natural sorting with offset from a certain value
I have the table with the data:

	CREATE TABLE IF NOT EXISTS `sort` (
		`id` int(10) NOT NULL AUTO_INCREMENT,
		`value` varchar(50) NOT NULL,
		PRIMARY KEY (`id`)
	);

	INSERT INTO `sort` (`id`, `value`) VALUES
		(1, 'abc1'),
		(2, 'abc10'),
		(3, 'abc2'),
		(4, '-10'),
		(5, '-1'),
		(6, '001abc'),
		(7, '1abc'),
		(8, '10abc'),
		(9, '2abc');

I have two queries:


	SELECT * FROM sort 
	ORDER BY 
	CAST(value AS signed), LENGTH(value), value; 

	SET @id=4;
	SELECT * FROM sort
	ORDER BY 
	id=@id DESC, value>=(SELECT value FROM sort WHERE id=@id) DESC, value ASC;

1. How can I combine the two queries into the second query? Both result sets must look the same.

2. Any ideas for natural sorting also string like '-1.56, -1.55, text 001, abc002'?
MySql natural sorting with offset from a certain value
===

I have the table with the data:

	CREATE TABLE IF NOT EXISTS `sort` (
		`id` int(10) NOT NULL AUTO_INCREMENT,
		`value` varchar(50) NOT NULL,
		PRIMARY KEY (`id`)
	);

	INSERT INTO `sort` (`id`, `value`) VALUES
		(1, 'abc1'),
		(2, 'abc10'),
		(3, 'abc2'),
		(4, '-10'),
		(5, '-1'),
		(6, '001abc'),
		(7, '1abc'),
		(8, '10abc'),
		(9, '2abc');

I have two queries:


	SELECT * FROM sort 
	ORDER BY 
	CAST(value AS signed), LENGTH(value), value; 

	SET @id=4;
	SELECT * FROM sort
	ORDER BY 
	id=@id DESC, value>=(SELECT value FROM sort WHERE id=@id) DESC, value ASC;

1. How can I combine the two queries into the second query? Both result sets must look the same.

2. Any ideas for natural sorting also string like '-1.56, -1.55, text 001, abc002'?