SELECT *, (SELECT fsi.active
FROM filters_sorts AS fsi
WHERE fs.`active`= '1' AND fs.`parent` !='0')
FROM filters_sorts AS fs
WHERE fs.`active`= '1' AND fs.`parent` ='0';
答案 0 :(得分:0)
请改用以下查询:
// 1. Open the page
page.open('file:///c:/temp/chart.html', function(status) {
// 2. Make adjustments
page.evaluate(function() {
/// Do stuff
});
// 3. Make screenshot, but not before waiting 5 seconds
// for browser to catch up with step 2.
setTimeout(function(){
page.render('after_change.png');
phantom.exit();
}, 5000);
});
您可以在SELECT fs1.name menuName, fs1.id menuId, fs2.id subMenuId, fs2.name subMenuName
FROM filters_sorts fs1
LEFT JOIN filters_sorts fs2 ON fs1.id = fs2.parent
WHERE fs1.parent=0
如果您想为一个主要类别添加一行,则可以执行以下操作:
SELECT