sql

Posted 258w

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql相关的知识,希望对你有一定的参考价值。

if(!empty($site) && $site != 9){
$siteword = $site;
$sql = ‘SELECT c.id, c.name, c.related_page,c.suitable_siteids, REPLACE(suitable_siteids, 0, 1234567)as rn,c.suitable_sex_flag, c.app_order, c.status, g.num FROM wis_hotwords c LEFT JOIN (select hotwords_id, count(hotwords_id) as num
from wis_hotwords_log as t
where ‘.$whereLog.‘
group by(hotwords_id)) as g ON c.id = g.hotwords_id where ‘.$where.‘ order by ‘. $orderWhere.‘ LIMIT ‘.$offset.‘ , ‘.$pageSize;
}else{
$sql = ‘SELECT c.id, c.name, c.related_page,c.suitable_siteids,c.suitable_sex_flag, c.app_order, c.status, g.num FROM wis_hotwords c LEFT JOIN (select hotwords_id, count(hotwords_id) as num
from wis_hotwords_log as t
where ‘.$whereLog.‘
group by(hotwords_id)) as g ON c.id = g.hotwords_id where ‘.$where.‘ order by ‘. $orderWhere.‘ LIMIT ‘.$offset.‘ , ‘.$pageSize;
}











以上是关于sql的主要内容,如果未能解决你的问题,请参考以下文章

sql [sql技巧]一些sql技巧#sql

sql 2008 r2 在sql 2008上兼容么

SQL基础

有大神知道,sql server 中如何批量执行sql语句吗?

pl sql developer怎么执行sql

pl sql developer怎么执行sql