Advertisement
AaEzha

Editing Drop Down Tanggal dengan Database Part 1 - AaEzha

May 16th, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 1.54 KB | None | 0 0
  1. Microsoft Windows [Version 6.1.7600]
  2. Copyright (c) 2009 Microsoft Corporation.  ALL rights reserved.
  3.  
  4. C:\Users\Aa>cd\xampp/mysql/bin & mysql -u root -p
  5. Enter password:
  6. Welcome TO the MySQL monitor.  Commands END WITH ; OR \g.
  7. Your MySQL connection id IS 2
  8. Server version: 5.0.67-community-nt MySQL Community Edition (GPL)
  9.  
  10. TYPE 'help;' OR '\h' FOR help. TYPE '\c' TO clear the buffer.
  11.  
  12. mysql> CREATE DATABASE tanggal;
  13. Query OK, 1 ROW affected (0.00 sec)
  14.  
  15. mysql> USE tanggal;
  16. DATABASE changed
  17. mysql> CREATE TABLE profil(
  18.     -> id INT(3) AUTO_INCREMENT PRIMARY KEY,
  19.     -> nama VARCHAR(30) NOT NULL,
  20.     -> tanggal VARCHAR(20) NOT NULL
  21.     -> );
  22. Query OK, 0 ROWS affected (0.03 sec)
  23.  
  24. mysql> DESC profil;
  25. +---------+-------------+------+-----+---------+----------------+
  26. | FIELD   | TYPE        | NULL | KEY | DEFAULT | Extra          |
  27. +---------+-------------+------+-----+---------+----------------+
  28. | id      | INT(3)      | NO   | PRI | NULL    | AUTO_INCREMENT |
  29. | nama    | VARCHAR(30) | NO   |     | NULL    |                |
  30. | tanggal | VARCHAR(20) | NO   |     | NULL    |                |
  31. +---------+-------------+------+-----+---------+----------------+
  32. 3 ROWS IN SET (0.01 sec)
  33.  
  34. mysql> INSERT INTO profil VALUES('','AaEzha','16-Agustus-1989');
  35. Query OK, 1 ROW affected, 1 warning (0.00 sec)
  36.  
  37. mysql> SELECT * FROM profil;
  38. +----+--------+-----------------+
  39. | id | nama   | tanggal         |
  40. +----+--------+-----------------+
  41. |  1 | AaEzha | 16-Agustus-1989 |
  42. +----+--------+-----------------+
  43. 1 ROW IN SET (0.00 sec)
  44.  
  45. mysql>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement