« postgres date フォーマット | メイン | 今から1年後 insert »

2009年10月01日

postgres case文

よーわすれるのでメモ


$sql .= " CASE";
foreach($gift_corse as $t_key => $t_dat){
    $sql .=" WHEN gift_corse_id = ".$t_key." then '".$t_dat[0]."'";
}
$sql .= " END AS gift_corse_id,";

投稿者 muuming : 2009年10月01日 09:25

コメント

コメントしてください




保存しますか?