doulian4467 2013-09-09 21:37
浏览 32

too long

Using WordPress with WordPress MultiLanguage. I noticed a page was 404ing, so I dumped the query that was being output, and got the following (formatted exactly like below):

SELECT   newsite_posts.* FROM newsite_posts   JOIN newsite_icl_translations t ON newsite_posts.ID = t.element_id
                    AND t.element_type = 'post_sectors' JOIN newsite_icl_languages l ON t.language_code=l.code AND l.active=1 WHERE 1=1  AND newsite_posts.post_name = 'advisory-practice' AND newsite_posts.ID = 456 AND newsite_posts.post_type = 'sectors' AND t.language_code='es'  ORDER BY newsite_posts.post_date DESC 

Threw it in PHPMyAdmin SQL tab, got 0 results. Beneath the part where it says "MySQL returned an empty result set", it reoutputted my query for me, formatted like below:

SELECT newsite_posts. * 
FROM newsite_posts
JOIN newsite_icl_translations t ON newsite_posts.ID = t.element_id
AND t.element_type =  'post_sectors'
JOIN newsite_icl_languages l ON t.language_code = l.code
AND l.active =1
WHERE 1 =1
AND newsite_posts.post_name =  'advisory-practice'
AND newsite_posts.ID =456
AND newsite_posts.post_type =  'sectors'
AND t.language_code =  'es'
ORDER BY newsite_posts.post_date DESC 

so I copied and pasted back into the SQL tab of phpmyadmin and it works, 1 row found. This is the same exact query, formatted differently. What is going on here? This is affecting my code, too, it's not just a phpmyadmin bug. Am I crazy? Am I missing something?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 关于大棚监测的pcb板设计
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器