Display Distinct records with random generate and limit
<p>I am working on below query and its working fine. But now I want to fetch records from database with random data so every time differnt records comes as return.</p>

<p><strong>Working Query</strong></p>

<pre><code>$limit = " LIMIT 0," . ($pageNumber * intval($page_record));
$query = "SELECT * FROM logos L WHERE L.status=1 ".$limit;
</code></pre>

<p>I have tried <code>ORDER BY RAND()</code>.</p>

<pre><code>$limit = " LIMIT 0," . ($pageNumber * intval($page_record));
$query = "SELECT * FROM logos L WHERE L.status=1 ORDER BY  RAND() ".$limit;
</code></pre>

<p><strong>Problem :</strong> Above query give me same data more than once.</p>

<p><strong>1) Should I able to achieve distinct records with random records and limit?</strong></p>

<p><strong>2) If not possible above then should I achieve it by PHP code?</strong> </p>

<p>I am little bit confuse. Please help if any good solution or idea.</p>

<p>If anything wrong then paste it in comment rather then minus vote.</p>

<p>Thanks in advance!</p>