$statement = $dbh->prepare("SELECT * FROM files WHERE name = :name");
$statement->execute(array(":name" => '/var/www/test/1.txt'));
$result = $statement->fetch();
`currency_code` varchar(3)
Лучше ID записывать и сделать тип поля INT--
-- Структура таблицы `country`
--
CREATE TABLE IF NOT EXISTS `country` (
`id` smallint(4) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`code` int(11) unsigned NOT NULL,
`currency_code` varchar(3) NOT NULL,
UNIQUE KEY `id` (`id`,`name`,`code`),
KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
-- --------------------------------------------------------
--
-- Структура таблицы `currency`
--
CREATE TABLE IF NOT EXISTS `currency` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) NOT NULL,
`name` varchar(50) NOT NULL,
`symbol` char(1) NOT NULL,
`bank_code` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`,`name`,`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
SELECT *
FROM
`currency`
INNER JOIN `country` ON (`currency`.`id` = `country`.`code`)
$("form").serialize();
parse_str($_POST["data"], $data);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Документ без названия</title>
<style type="text/css">
.wrapper {
width:800px;
height:800px;
margin:0 auto;
border-left:1px #ccc solid;
border-right:1px #ccc solid;
background:white;
}
.wrapper .blue {
background:blue;
height:150px;
}
.wrapper .px300 {
height:300px;
}
.wrapper .red {
height:150px;
width:100%;
left:0;
position:absolute;
z-index:-1;
background:red;
margin-top:20px;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="px300"></div>
<div class="red"></div>
<div class="blue"></div>
</div>
</body>
</html>
$_POST['type']
используйте Input::get('type')
$validator = Validator::make(Input::all(), array(
'email' => 'email|unique:users',
'name' => 'required|min:3|max:20',
'lastname' => 'required|min:3|max:20'
));