Yii v2 snippet guide

Comparing #5 with #6

Revision #6 was created by rackycz rackycz on Sep 19, 2019, 8:42:57 PM.

db

Content

[...]
---
... text ...

User management + basic SQL commands
---
... text ...To create DB with users, use following command. If you must use MyISAM instead of InnoDB, just skip the last row.
 
 
```MySQL
 
CREATE TABLE IF NOT EXISTS `user` (
 
  `id` INT NOT NULL AUTO_INCREMENT,
 
  `username` VARCHAR(45) NOT NULL,
 
  `password` VARCHAR(60) NOT NULL,
 
  PRIMARY KEY (`id`))
 
ENGINE = InnoDB;
 
```
 
 
First user:
 
```MySQL
 
INSERT INTO `user` (`id`, `username`, `password`) VALUES (1, 'user01', '0497fe4d674fe37194a6fcb08913e596ef6a307f');
 
```


Login via database + Session
---
... text ...
[...]