$insertQuery = "INSERT INTO Friendship(user_ID, friend_ID) \n values ('{$user_ID}', '{$friend_ID}')"; $result = mysqli_query($connection, $insertQuery); echo "Result of creating Friendship is {$result} <br>"; $count = mysqli_insert_id($connection); echo "Creating record #{$count} <br>"; } createUser('Billy', 'Bob', '*****@*****.**', '4645748', 'bbob87', 'password123', 'My name is Billy and I like to run', $connection); createUser('Walter', 'White', '*****@*****.**', '9428413', 'heisenburg', 'holly123', 'Apply yourself!', $connection); createData('1', '2015-11-03', '2541', '23', '758', '12', $connection); createData('1', '2015-11-02', '1727', '18', '649', '7', $connection); createData('1', '2015-11-01', '2216', '20', '730', '9', $connection); createData('1', '2015-10-31', '1031', '20', '730', '9', $connection); createData('1', '2015-10-30', '1030', '20', '730', '9', $connection); createData('1', '2015-10-29', '1029', '20', '730', '9', $connection); createData('1', '2015-10-28', '1028', '20', '730', '9', $connection); createData('1', '2015-10-27', '1007', '20', '730', '9', $connection); createData('2', '2015-11-03', '2412', '22', '795', '11', $connection); createData('2', '2015-11-02', '2894', '26', '924', '14', $connection); createData('2', '2015-11-01', '1479', '15', '623', '7', $connection); createData('2', '2015-10-10', '2412', '22', '795', '11', $connection); createTarget('1', '2015-11-01', '3500', '10', '15', $connection); createFriendship('1', '2', $connection); $error = mysqli_error($connection); echo "{$error}"; ?> </div> </body> </html>
createUser('bbob87', 'Billy', 'Bob', '*****@*****.**', '4645748', 'password123', 'My name is Billy and I like to run', $connection); createUser('holly123', 'Walter', 'White', '*****@*****.**', '9428413', 'heisenburg', 'Apply yourself!', $connection); createData('bbob87', '2015-03-05', '3456', '24', '980', '14', $connection); createData('holly123', '2015-03-05', '2541', '23', '758', '12', $connection); createData('bbob87', '2015-11-03', '2541', '23', '758', '12', $connection); createData('bbob87', '2015-11-02', '1727', '18', '649', '7', $connection); createData('bbob87', '2015-11-01', '2216', '20', '730', '9', $connection); createData('bbob87', '2015-10-31', '1031', '20', '730', '9', $connection); createData('bbob87', '2015-10-30', '1030', '20', '730', '9', $connection); createData('bbob87', '2015-10-29', '1029', '20', '730', '9', $connection); createData('bbob87', '2015-10-28', '1028', '20', '730', '9', $connection); createData('bbob87', '2015-10-27', '1007', '20', '730', '9', $connection); createData('holly123', '2015-11-03', '2412', '22', '795', '11', $connection); createData('holly123', '2015-11-02', '2894', '26', '924', '14', $connection); createData('holly123', '2015-11-01', '1479', '15', '623', '7', $connection); createData('holly123', '2015-10-10', '2412', '22', '795', '11', $connection); createData('holly123', '2015-11-10', '2412', '22', '795', '11', $connection); createData('holly123', '2015-11-12', '1412', '22', '795', '11', $connection); createData('holly123', '2015-11-13', '2412', '22', '795', '11', $connection); createData('holly123', '2015-11-14', '1412', '32', '795', '11', $connection); createData('holly123', '2015-11-15', '2612', '22', '725', '11', $connection); createTarget('holly123', '2015-11-19', '3500', '10', '15', $connection); $error = mysqli_error($connection); echo "{$error}"; ?> </div> </body> </html>