Tolik rozruchujen v LopuchuLopuch.cz
mysql> select * from a; +----+------+ | id | t | +----+------+ | 1 | AAA | | 2 | Aaa | | 3 | aaa | | 4 | bab | | 5 | baa | | 6 | baa_ | | 7 | A_a | | 8 | A_A | +----+------+ 8 rows in set (0.00 sec) mysql> select * from a where t like 'A%'; +----+------+ | id | t | +----+------+ | 1 | AAA | | 2 | Aaa | | 3 | aaa | | 7 | A_a | | 8 | A_A | +----+------+ 5 rows in set (0.00 sec) mysql> select * from a where t like 'a%'; +----+------+ | id | t | +----+------+ | 1 | AAA | | 2 | Aaa | | 3 | aaa | | 7 | A_a | | 8 | A_A | +----+------+ 5 rows in set (0.00 sec) mysql> select * from a where t like 'a\_%'; +----+------+ | id | t | +----+------+ | 7 | A_a | | 8 | A_A | +----+------+ 2 rows in set (0.00 sec) mysql> select * from a where t like 'a\_A%'; +----+------+ | id | t | +----+------+ | 7 | A_a | | 8 | A_A | +----+------+ 2 rows in set (0.00 sec)
$sql = "select * from uzivatele where $kde like '"; if (!$poc) $sql .= "%"; //procento se vyplňuje pouze když nehledám podle prvního $sql .= "$hledat%' order by $jak";