how to get username from session and save in db in java code example
Example 1: get all db sizes in mysql server
SELECT table_schema "DB Name",
ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
FROM information_schema.tables
GROUP BY table_schema;
Example 2: how to store data with php
<?php
$username = "myUsername"
$filename = uniqid($username, true).".csv";
$userInfo = ["username" => $username, "points" => 0];
file_put_contents($filename, serialize($userInfo));
$userInfo = unserialize(file_get_contents($filename));
print($userInfo["points"]);
print($userInfo["username"]);
?>
Example 3: delete and start fresh with db django
Delete the sqlite database file (often db.sqlite3) in your django project folder (or wherever you placed it)
Delete everything except __init__.py file from migration folder in all django apps
Make changes in your models (models.py).
Run the command python manage.py makemigrations or python3 manage.py makemigrations
Then run the command python manage.py migrate.