mysql> create table phrases (id int, phrase varchar (255));
Query OK, 0 rows affected (0.06 sec)
mysql> INSERT INTO phrases VALUES (1,
-> 'Ach sind die String Funktionen in MySQL 5.x so geil :) Die ersparen einem echt super viel Arbeit ;-)'
-> );
Query OK, 1 row affected (0.03 sec)
mysql> select * from phrases;
+------+------------------------------------------------------------------------------------------------------+
| id | phrase |
+------+------------------------------------------------------------------------------------------------------+
| 1 | Ach sind die String Funktionen in MySQL 5.x so geil :) Die ersparen einem echt super viel Arbeit ;-) |
+------+------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select id, concat(substring_index(phrase," ",8),'...') from phrases;
+------+------------------------------------------------+
| id | concat(substring_index(phrase," ",8),'...') |
+------+------------------------------------------------+
| 1 | Ach sind die String Funktionen in MySQL 5.x... |
+------+------------------------------------------------+
1 row in set (0.00 sec)
mysql> select id, concat(substring_index(phrase," ",10),'...') from phrases;
+------+--------------------------------------------------------+
| id | concat(substring_index(phrase," ",10),'...') |
+------+--------------------------------------------------------+
| 1 | Ach sind die String Funktionen in MySQL 5.x so geil... |
+------+--------------------------------------------------------+
1 row in set (0.00 sec)