简体   繁体   中英

Empty record MySQL, how find?

Please help to fix this error:

SELECT SQL_CACHE p.user_id, p.project_id, p.cid, p.project_title, p.additional_info, p.buynow_price, p.date_added, p.highlite, p.project_details, p.views, p.bids, p.currentprice, p.currencyid, p.buynow, p.filtered_auctiontype, p.buynow_purchases, p.date_starts, p.buynow_qty_lot, p.items_in_lot, UNIX_TIMESTAMP(p.date_end) - UNIX_TIMESTAMP('2017-08-05 18:14:50') AS mytime, UNIX_TIMESTAMP(p.date_starts) - UNIX_TIMESTAMP('2017-08-05 18:14:50') AS starttime, p.donation, p.filter_budget, p.reserve, p.project_state, p.bid_details, p.filter_escrow, p.filter_gateway, p.charityid, p.jobs_price
          FROM xxx_projects AS p
          LEFT JOIN xxx_users u ON(p.user_id = u.user_id)
          WHERE p.visible = '1'
          AND p.status = 'open'
          AND p.project_state = 'product'
          AND u.status = 'active'
          AND p.project_id IN (88414723, 5043541, 98506492, 36121136, 84626697, , 4408122, 49183201, 56318356, 89533629, 16433073, 70069844, 6242686, 8745727, 10816822, 8745727, 27902749, 41807041, 61556755, 46837725, 38855144, 69491982, 27240408, 20425411)
          

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' 4408122, 49183201, 56318356, 89533629, 16433073, 70069844, 6242686, 8745727, 10' at line 8

I think in db is empty record but i can'f find it...

You have a double comma in 84626697, , 4408122 . Just remove one comma (ie, make it 84626697, 4408122 ) and you should be good to go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM