Roy Sukro VIP Member
Jumlah posting : 392 Points : 711 Reputation : 17 Join date : 06.02.11 Age : 35 Lokasi : dimana-mana ada ^^
| Subyek: insert int & char in mysql Sun Oct 23, 2011 1:58 am | |
| sekarang coba buat database users, dengan 3 field yaitu id, nama, password, sama seperti cara kemarin yang kita buat disini bukan cara membuat nya tetapi cara untuk memasukkan sesuatu didalam field tersebut sekarang kita akan memasukkan pada field id, nama dan password.. nah langsung saja, cara seperti dibawah ini : - Quote :
- mysql> use users;
Database changed
mysql> INSERT INTO users(nama,password) VALUES("slank",md5("virus")); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO users(id,nama,password) VALUES(1,"wali",md5("thoyib")); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO users(id,nama,password) VALUES(2,"ungu",md5("thoyib")); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO users(id,nama,password) VALUES(3,"padi",md5("dilema")); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO users(id,nama,password) VALUES(3,"sheila",md5("sephia")); Query OK, 1 row affected (0.00 sec)
mysql> select *from users; +----+--------+----------------------------------+ | id | nama | password | +----+--------+----------------------------------+ | 0 | slank | 326577fbe6d73973bd67437829bf9301 | | 1 | wali | 2445f04b7c0952ed02c002b6c7104531 | | 2 | ungu | 2445f04b7c0952ed02c002b6c7104531 | | 3 | padi | b9d5c8fc27e4255c8b993fc976087ca3 | | 4 | sheila | b19dc3fd7a8bd1dd1c97548f8d3a5373 | +----+--------+----------------------------------+ 5 rows in set (0.00 sec)
mudah kan, udah jadi tu terisi, id, nama, dan password nya :D selamat mencoba, explore your brain | |
|
night D. fury larva
Jumlah posting : 284 Points : 311 Reputation : 5 Join date : 05.07.11 Age : 34 Lokasi : Tanah nenek & kakek moyang
| Subyek: Re: insert int & char in mysql Sun Oct 23, 2011 9:05 am | |
| mantrap mas izin comot | |
|