Unknown column 'rating' in 'order clause'
SELECT * FROM photos WHERE gallery=17 ORDER BY rating DESCarray(2) { [0]=> array(4) { ["file"]=> string(51) "/home/getdirty/public_html/process/event-photos.php" ["line"]=> int(34) ["function"]=> string(6) "db_con" ["args"]=> array(1) { [0]=> &string(58) "SELECT * FROM photos WHERE gallery=17 ORDER BY rating DESC" } } [1]=> array(4) { ["file"]=> string(36) "/home/getdirty/public_html/index.php" ["line"]=> int(129) ["args"]=> array(1) { [0]=> string(51) "/home/getdirty/public_html/process/event-photos.php" } ["function"]=> string(7) "include" } }