<commit_before><?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include('scripts/dbconnect.php');
session_start();

//before we continue, check that there IS a username
if (isset($_SESSION['username'])) {
    $username = $_SESSION['username'];

    $clubid = $_POST['clubid'];

//find the username's id via query

    $queryuserid = ("SELECT userID from port_users where username = '$username'");

    $resultuserid = $db->query($queryuserid);

    while ($row = $resultuserid->fetch_array()) {
        $id = $row['userID'];
    }

//before inserting check if id is already in club.

    $checkquery = ("SELECT userid, clubid from port_usersinclubs WHERE userid = '$id' AND clubid = ''$clubid'");
<commit_msg>trying to fix my awful database design<commit_after><?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include('scripts/dbconnect.php');
session_start();

//before we continue, check that there IS a username
if (isset($_SESSION['username'])) {
    $username = $_SESSION['username'];

    $clubid = $_POST['clubid'];

//find the username's id via query

    $queryuserid = ("SELECT userID from port_users where username = '$username'");

    $resultuserid = $db->query($queryuserid);

    while ($row = $resultuserid->fetch_array()) {
        $id = $row['userID'];
    }

//before inserting check if id is already in club.

    $checkquery = ("SELECT userid, clubid from port_usersinclubs WHERE userid = '$id' AND clubid = '$clubid'");

{'fraction_non_alphanumeric': 0.1564935064935065, 'fraction_numerical': 0.0025974025974025974, 'mean_word_length': 4.644688644688645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1170665', 'n_tokens_mistral': 491, 'n_tokens_neox': 472, 'n_words': 136}