semperfi Posted May 2, 2011 Share Posted May 2, 2011 I keep getting this error "Unknown column 'stop_status' in 'field list'" here's what I have can someone please let me know whats the problem and how to resolve it? I tried single and double quote. if($order!="") { $query = "select a.auctionID,a.productID as productID,a.categoryID as categoryID,auc_start_price,auc_final_price,auc_start_date,auc_end_date,auc_start_time,auc_end_time,auc_status,auc_type,auc_recurr,buy_user, auc_fixed_price,fixedpriceauction,pennyauction,nailbiterauction,offauction,nightauction,openauction,ftsauction,{$sqlFields3}time_duration,auc_final_end_date,total_time,ar.stop_status,ar.pause_status,shipping_id,future_tstamp,recurr_count,auction_min_price,min_win_price, use_free,allowbuynow,buynowprice,reverseauction,uniqueauction,halfbackauction,seatauction,bidpack,tax1,tax2,bidpack_name,bidpack_price,p.name,price,username from auction a left join (SELECT auctionID, stop_status, pause_status FROM auction_running) ar on a.auctionID = ar.auctionID left join products p on a.productID=p.productID left join registration r on r.id=a.buy_user left join bidpack b on b.id=a.productID where p.name like '$order%'"; } else { $query = "select a.auctionID,a.productID as productID,a.categoryID as categoryID,auc_start_price,auc_final_price,auc_start_date,auc_end_date,auc_start_time,auc_end_time,auc_status,auc_type,auc_recurr,buy_user, auc_fixed_price,fixedpriceauction,pennyauction,nailbiterauction,offauction,nightauction,openauction,ftsauction,{$sqlFields3}time_duration,auc_final_end_date,total_time,ar.stop_status,ar.pause_status,shipping_id,future_tstamp,recurr_count,auction_min_price,min_win_price, use_free,allowbuynow,buynowprice,reverseauction,uniqueauction,halfbackauction,seatauction,bidpack,tax1,tax2,bidpack_name,bidpack_price,p.name,price,username from auction a left join (SELECT auctionID, stop_status, pause_status FROM auction_running) ar on a.auctionID = ar.auctionID left join products p on a.productID=p.productID left join registration r on r.id=a.buy_user left join bidpack b on b.id=a.productID "; } <?php for($i=0;$i<$total;$i++) { if($PageNo>1) { $srno = ($PageNo-1)*$PRODUCTSPERPAGE+$i+1; } else { $srno = $i+1; } $row = mysql_fetch_object($result); $id=$row->auctionID; $pname=$row->bidpack?stripslashes($row->bidpack_name): stripslashes($row->name); $fprice=$row->auc_final_price; $status=$row->auc_status; $pause=$row->pause_status; $stop=$row->stop_status; $auctype = $row->auc_type; ?> Quote Link to comment https://forums.phpfreaks.com/topic/235384-help-please-unknown-column-stop_status-in-field-list/ Share on other sites More sharing options...
fugix Posted May 2, 2011 Share Posted May 2, 2011 That means that it cannot find a field in your db under that name Quote Link to comment https://forums.phpfreaks.com/topic/235384-help-please-unknown-column-stop_status-in-field-list/#findComment-1209674 Share on other sites More sharing options...
semperfi Posted May 2, 2011 Author Share Posted May 2, 2011 That means that it cannot find a field in your db under that name Thanks overlooked the table in the DB was looking at auction_run_status instead of auction_running table (dont know how i missed that) and added the correct field into the table and now everything is working... Quote Link to comment https://forums.phpfreaks.com/topic/235384-help-please-unknown-column-stop_status-in-field-list/#findComment-1209687 Share on other sites More sharing options...
fugix Posted May 2, 2011 Share Posted May 2, 2011 Glad you got it working Quote Link to comment https://forums.phpfreaks.com/topic/235384-help-please-unknown-column-stop_status-in-field-list/#findComment-1209690 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.