//前端ajax提交資料 --> {$article.love} //後台更新資料庫並判斷ip是否存在 $realip=getip();//echo $realip;modifyipcount($realip);@$love=$_POST['id'];if(isset($love)){$query="SELECT * FROM ecs_article_love where
$idss = '3,2,7,5';$re = $db->findall('select id,title from aaa where id in('.$idss.')');foreach($re as $list){ echo $list['id'].',';} 輸出結果是:2,3,5,7 怎麼才能讓它按照$idss的順序輸出:3,2,7,5, 呢?謝謝!
所需要的:jquery庫,phpexcel外掛程式,頁面匯出excel效果測試檔案explode.php,excel匯出功能實現檔案exp.php和explode_excel.php,檔案相關內容在此文下面: explode.php:測試頁面內容:訪問此頁面後單擊explode1與explode2能匯出兩種不同效果的excel,代碼如下: Date CSAT Score Grand Total CSAT 08/01/11 0 0
,欄位tid儲存的是文章標籤id,用逗號分隔的字串,我現在想通過標籤,來查出來所有的文章,比如“2”,來查出所有tid欄位裡有2的文章,現在我用SELECT * FROM `t_ms_article` WHERE `tid` IN (2)語句只能查出來以2開頭的文章,而不能查出來‘1,2,3’這樣的 希望能幫我一下,我是菜鳥 回複討論(解決方案)
在 idea 中用 openshift 的 PHP 5.4 with Zend Server 6.1 , Settings 中 Build,Execution,Deployment->Clouds 處已添加 openshift 帳號,添加 ssh public key 成功, idea 中用 Check out from Version Control 的 git 那 Clone 成功,我在 Run 裡的 Edit Configurations 裡添加了 Openshift
@$love=$_POST['id'];if(isset($love)){$query="SELECT * FROM ecs_article_love where article_id='$love' AND ip='$realip'";$result=mysql_query($query);$row=mysql_fetch_row($result);//dump($row);$ip1=$row[2];$ip2=$realip;$todaytime=strtotime(date('Y-m-d')