Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Like i said in my comment, <code>index.php?s=all-movies&amp;order=#&amp;site=1</code> is equal to <code>index.php?s=all-movies&amp;order=</code>. </p> <p>Try <code>urlencode</code> and if <code>$order</code> is <code>#</code> just remove <code>title LIKE</code> expression from your query<br> To get all <code>title</code> with special chars use <code>REGEXP</code> expression</p> <p>See <a href="https://stackoverflow.com/a/401819/2476247">this answer</a> </p> <pre><code>&lt;?php $order = ( isset( $_GET["order"] ) ) ? strtolower( mysql_real_escape_string( trim( $_GET["order"] ) ) ) : "#"; $order = ( !$order ) ? chr( 35 ) : $order; $page_nav = array(); $chars = array_merge( range( "a", "z" ), array( chr( 35 ) ) ); foreach( $chars as $chr ) { $page_nav[] = ( $chr === $order ) ? "&lt;li class='aktiv'&gt;".$chr."&lt;/li&gt;" : "&lt;li&gt;&lt;a href='index.php?s=all-movies&amp;order=".urlencode( $chr )."&amp;site=1'&gt;".$chr."&lt;/a&gt;&lt;/li&gt;"; } echo implode( "\n", $page_nav ); $sqlCmdSearch = " SELECT `id`, `name`, `title`, `countryyear`, `type`, `hoster`, `cover`, `picturequality`, `language`, `rating`, `date` FROM `topmovies`.`movies` WHERE `status` = 'online' AND `type` = 'movie' AND %s GROUP BY `title` ORDER BY `title` "; if ( $order === chr( 35 ) ) { // This query will return all rows where title contains any non-alphanumeric characters. $sqlCmdSearch = sprintf( $sqlCmdSearch, "NOT `title` REGEXP '[A-Za-z]'" ); } else { $sqlCmdSearch = sprintf( $sqlCmdSearch, "`title` LIKE '%{$order}%'" ); } // now do your db query here ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload