// MySQL 読み込み。
$dbname = "bungaku";
mysql_select_db("$id");
$result = mysql_query("SELECT kai, nendo, myoji, namae, sakuhin, keisai FROM $dbname WHERE sakusya='$wid' or kai='$wid' or nendo='$wid' or myoji='$wid' or sakuhin='$wid' or namae='$wid'");
$num_rows = mysql_num_rows($result);
$allkazu = $num_rows;
E:\ex> cl /c windows_ex.c
E:\home\toru\study\cxxw\opengl\ex2>cl /c wgl_window_ex1.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3052 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
E:\ex> link /OUT:windows_ex.exe windows_ex.obj user32.lib kernel32.lib gdi32.lib
Microsoft (R) Incremental Linker Version 7.10.3052
Copyright (C) Microsoft Corporation. All rights reserved.
C:\work>cl /GX hello.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
hello.cpp
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
if ($story =~/\W+$/) { &error("ストーリーの名前に禁則文字が使われています"); }
if ($page =~/\D+$/) { &error("ページ番号に禁則文字が使われています"); }
if ($bunki =~/\W+$/) { &error("ストーリー分岐に禁則文字が使われています"); }use Jcode;
use Unicode::Japanese;
use CGI::Carp qw(fatalsToBrowser);
// MySQL 読み込み。
$dbname = "bungaku";
mysql_select_db("$id");
//テーブルがあるかどうか 0=なし 1=あり
function table_exist($dbname){
$result = mysql_call("show tables like '$dbname'");
if(!$result){return 0;}
$a = mysql_fetch_row($result);
mysql_free_result($result);
return $a;
}
$result = mysql_query("SELECT kai, nendo, myoji, namae, sakuhin, shozoku FROM $dbname WHERE sakusya='$wid' or kai='$wid' or nendo='$wid' or myoji='$wid' or sakuhin='$wid' or namae='$wid'");
$num_rows = mysql_num_rows($result);
$allkazu = $num_rows;
sub kiroku {
flock(OUT, LOCK_EX);
if (!open(OUT,">> ./datalog.csv")) { &error(); }
print OUT "$word,$kensaku\n";
chmod(0666,"./datalog.dat");
close OUT;
flock(OUT, LOCK_NB);
}
<?php
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
DROP TABLE IF EXISTS `data`;
CREATE TABLE IF NOT EXISTS `data` (
`id` varchar(15) NOT NULL,
`name` varchar(15) NOT NULL,
`age` varchar(3) NOT NULL,
`tel` varchar(15) NOT NULL,
`mes` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
VERINF1 VERSIONINFO
FILEVERSION 0,0,1,0
PRODUCTVERSION 0,0,1,0
FILEOS 0x00000004
FILETYPE 0x00000000
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "FileVersion", "0.0.1.0\0"
VALUE "ProductVersion", "0.0.1.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation",0x0409, 0x04b0
END
END
pg_set_client_encoding("sjis");
$database = "database";
$result = pg_query("SELECT id, name FROM $database WHERE id='$qry'");
if (!$result) {
die('クエリーが失敗しました。'.pg_last_error());
}
ISO-2022-JP-1 (RFC2237) is a superset of ISO-2022-JP (RFC1468) which adds support for JIS X 0212-1990. That means you can use the same code to decode to utf8 but not vice versa.