ocdladefense / appserver-car
A module for viewing and managing case review data.
Installs: 213
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:wordpress-theme
Requires
- ocdladefense/lib-database: ~2.0
- ocdladefense/lib-date: ~1.0
- ocdladefense/lib-gis: ~1.0
This package is auto-updated.
Last update: 2024-10-13 20:00:19 UTC
README
Example queries
SELECT id, title, plaintiff, defendant, published_date, decision_date FROM car ORDER BY decision_date DESC;
SELECT * FROM car WHERE year=2022 AND month=2 AND published_date=0000-00-0 ORDER BY day DESC;
UPDATE car SET decision_date = CAST(CONCAT_WS("-",year,month,day) AS DATE) WHERE year=2022 AND month=2 AND published_date=0000-00-0
UPDATE car SET decision_date = 20220224 WHERE year=2022 AND month=2
SELECT CAST(CONCAT_WS("-",year,month,day) AS DATE) FROM car WHERE year=2022 AND month=2
UPDATE car SET decision_date = STR_TO_DATE(CONCAT_WS("-",year,month,day),'%Y-%m,%d') WHERE year=2022 AND month=2 AND published_date=0000-00-0
SELECT id, published_date, decision_date FROM car WHERE year=2022 AND month=2
SELECT CONCAT_WS("-",year,month,day) FROM car WHERE year=2022
Installation
Summary
Installation consists of a PHP executable component and a MySQL database component.
PHP Executable
- Clone this repository into your local Appserver's /modules directory.
- Rename the newly-downloaded repository directory to car/.
- Validate that the config/config.php contains database-related options for setting the database name, username and password.
- This section should be completed with the values chosen in the "MySQL Database" section, below.
MySQL Database
- Identify the data/sql folder and data/sql/car.sql file in this repo.
- This SQL file contains data to be imported into your Appserver's database.
- Open your WAMP --> phpMyAdmin database utility.
- Login using the default "superuser" credentials:
- username: root
- password: [the default root password is empty]
- Familiarize yourself with the user interface.
- Create a new database; you can name it anything, but let's give preference to "ocdla."
- Optionally, use phpMyAdmin to create an additional user (separate from the root user) with access to the new database.
- A MySQL user consists of a username, password and a set of privileges for a given database or database.table combination.
- Identify the import functionality and either select the car.sql file for upload/import or copy and paste its contents into the phpMyAdmin interface; execute the import.
- The car.sql imports both the new car table/schema and data (rows) into the database server.
- Use phpMyAdmin to browse the newly-imported data; validate that the data from car.sql was imported successfully.
- Configure the Appserver's config/config.php database section with the values for database name and username and password.
Validate installation
To validate installation of the car repo + data, navigate to http://appserver/car/list.