I've changed my query to:
$order = "SUBSTRING_INDEX(objektname,'-',1)";
$order .=
",RIGHT(objektname,(LENGTH(objektname)-LOCATE('-',objektname)))";
so that the syntax ist okay, and the tests too:
mySQL returns the correct values:
objekt SUBSTRING_INDEX(objekt,'-',1) LENGTH(objekt)
LOCATE('-'
I've changed my query to:
$order = "SUBSTRING_INDEX(objektname,'-',1)";
$order .=
",RIGHT(objektname,(LENGTH(objektname)-LOCATE('-',objektname)))";
so that the syntax ist okay, and the tests too:
mySQL returns the correct values:
objekt SUBSTRING_INDEX(objekt,'-',1) LENGTH(objekt)
LOCATE('-'