perlquestion
sulfericacid
<code>
SELECT id, name, location FROM book WHERE 1 ORDER BY $orderfield DESC
</code>
The above doesn't work when $orderfield is used, but when swapped with the actual field name "id" it works just fine. By not working, I mean it returns with "query returned empty".<p>
After a test print, it shows that $orderfield eq "id" which is the exact name of the column.<p>
Any ideas what might be hanging this up? And would it be possible to also change ASC/DESC to a variable as well?
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-115576">
<br><br>
"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us" <br><br>
sulfericacid
</div></div>