mirror of
https://github.com/RustyRaptor/p1-Lujan-Moffett-Arafat.git
synced 2026-12-03 18:05:15 -07:00
master
DBs Project
Requirements
- MYSQL Connector
- Python 3.6
- Run on CS Machines
Setup
Database setup
-
Connect to mysql on CS machines
- `mysql -h dbclass -u your_username -p
-
Select the database
- list the databases to pick from and pick the one.
show databases;
- Select the one with your name and class name
use name_of_db
- list the databases to pick from and pick the one.
-
Execute the sql files we made in part 1 (you will need to specify their path if you aren't in the correct folder)
source cleardb.sqlsource crtdb.sqlsource insdb.sql
-
You can test the setup by running disptbl and dispvals as well.
Running part2.py
(first setup the database above)
- cd into the git repo root folder.
- run `python3 part2.py
The <args> is a space separated list of questions to answer. Has to be numbers between 1 and 8 inclusive.
Notes
- We were unable to reach Brandon throughout the course of our work on Part 2 of this project. He did not contribute to part 2.
Assumptions
- The program assumes that inserted commissionRate value is average commission rate.
Setup PHP
The Easy Way (using the makefile ziad made)
make setup_php --silent
The hard way (using the CS instructions :( )
- Login to your CS machine account.
- in your home folder create a folder called
public_htmlmkdir ~/public_html
- Setup the folder permissions for that folder
chmod 0711 public_html
- Also setup folder perms for your home folder because that wasn't enough aparently.
chmod 0711 ~/
- Copy all the files under
/phpin the git repo into thepublic_htmlfolder- open
https://www.cs.nmsu.edu/~<your_user_name>in your browser. - example
https://www.cs.nmsu.edu/~zarafatfor Ziad's
- open
- It should work now. You can also test using an html file.
Deploy our code
- Make changes to the PHP code in the repo
- Commit your changes
make deploy_php --silent
Description
Mirror of github.com/RustyRaptor/p1-Lujan-Moffett-Arafat
3.1 MiB
0 Stars
1 Watchers
0 Forks
Languages
PHP
60.9%
Python
23.1%
Makefile
7%
HTML
5.2%
Shell
3.8%