2017-01-08から1日間の記事一覧

mysql ・and 指定した、条件が全て揃ったもの ・or どっちかの条件が当てはまったもの

・and 指定した、条件が全て揃ったもの select * from tossy where score >= 4.0 and team = 'yellow'; +----+------+-------------+--------+-------+---------------------+| id | name | email | team | score | created |+----+------+-------------+---…

mysql ・範囲に合致するもの between ・a か b のどちらか in('red','yellow');

・範囲に合致するもの between select * from tossy where score between 5.0 and 10.0; +----+------+----------------+--------+-------+---------------------+| id | name | email | team | score | created |+----+------+----------------+--------+--…

mysql ・曖昧な検索 like % 任意の文字列 _ 文字数

select * from tossy where email like '%gmail.com'; +----+--------+------------------+--------+-------+---------------------+| id | name | email | team | score | created |+----+--------+------------------+--------+-------+------------------…

mysql where >= = != <>

・レコードを選んで抽出select name, created from tossy; +--------+---------------------+| name | created |+--------+---------------------+| toko | 2016-01-05 19:00:00 || to | 2016-01-01 15:00:00 || hanako | 2016-01-02 16:00:00 || hana | 201…

mysql メモ 2017_01

mysql テーブル(その中のシート)フィールド(列)レコード(行) ----- ・起動mysql -u root ----- ・パスワード設定set password for root@localhost=password('パスワード'); ・パスワード入力mysql -u root -p パスワードを入力する -----・(仮)データ…

PHP ページング

index.php -------- // もし 1以上の整数が入ってきた場合 正規表現if (preg_match('/^[1-9][0-9]*$/', $_GET['pag…

PHP お知らせ機能

index.php ------- <html lang="ja"><head> <meta charset="UTF-8"> <title>sample page</title> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.18.1/build/cssreset/cssreset-min.css"> <link rel="stylesheet" href="style.css"></head><body> <header id="top"> <h1>Title</h1></header></body></html>

PHP とりあえず全件出力

index.php -----