Is really necesary to "SELECT" the table for "ORDER by"?
<p>Is really necessary to select the entire table to order it by? I'm doing it now from a PHP file like this:</p><pre><br /><code>$sort = "SELECT * FROM mytable ORDER by date DESC";<br />$sorted = $conn->query($sort);<br />if (!$sorted) { echo 'Could not sort it: ' . mysql_error(); }<br /></code><br /></pre><p>I was thinking.... something like:</p><pre><br /><code>$sort = "mytable ORDER by date DESC";<br /></code><br /></pre><p>...could works maybe?</p><p>I feel not able to get a reliable test by myself since I'm new with this things and maybe I omit something, Thanks.</p><br /><h2>Click here view more answers <a href="%20http://stackoverflow.com/questions/34470136/is-really-necesary-to-select-the-table-for-order-by">http://ift.tt/1Oes8JN</a></h2>
Nhận xét
Đăng nhận xét