SELECT x.quantity AS total, x.magazine,m.id, m.title,m.author , c.name AS categoryName, cn.alias, cnn.alias AS baseURL FROM v2_download_quantity x LEFT JOIN v2_magazine m ON x.magazine = m.id LEFT JOIN v2_category c ON c.id = m.categoryid LEFT JOIN v2_category cn ON cn.id = c.parentid LEFT JOIN v2_category cnn ON cnn.id = cn.parentid WHERE m.audit = "通过审核" AND cn.parentid = '266' ORDER BY total DESC LIMIT 0 , 10上面是SQL语句,字符转换的问题???能说详细一些吗?
需要DB_CODE和CHARSET转换一下
转换函数mb_convert_encoding("通过审核", CHARSET, DB_CODE);