[CakePHP 2.x]テーブルのカラム名を取得

テーブルのカラム名を取得

$this->Model->getColumnTypes();

Controller

$columnTypes=$this->SystemTest->getColumnTypes();
$columnNames=array_keys($columnTypes);
$this->set('columnTypes', $columnTypes);
$this->set('columnNames', $columnNames);

View

columnTypes<br/>
<?php
$tmp=var_export($columnTypes,true);
echo str_replace("\n", "<br/>", $tmp);
?>
<br/><br/>
columnNames<br/>
<?php
$tmp=var_export($columnNames,true);
echo str_replace("\n", "<br/>", $tmp);
?>

Sample

[objective-c]UIButtonのラベルを複数行にする

UIButtonのラベルを複数行にする

testbutton.layer.borderWidth=1.0;
[testbutton setTitle:@"あいうえお\nかきくけこ" forState:UIControlStateNormal];
UILabel*innerLabel= testbutton.titleLabel;
innerLabel.numberOfLines=0;
innerLabel.frame=CGRectMake(0, 0, testbutton.frame.size.width, testbutton.frame.size.height);

[Twitter]ツイートボタンとリダイレクト

ツイートボタンのdata-urlのurlがリダイレクト処理をしていたら
ツイート数はどのurlに対してカウントアップするのだろうか
答え:リダイレクト先でした

サンプル:/test/78/
サンプルの(1)はphpで(2)へリダイレクトする。
/test/78/access/index.php

<?php
header('Location:/test/78/redirected/');
?>

サンプルの(1)でツイートすると(2)のツイート数が増える。