Epihedron / Adventurer

Adventurer webpage and assests
epihedron.com
3 stars 0 forks source link

seeds file for dev database #54

Closed zerske closed 10 years ago

zerske commented 10 years ago

Need to write a file (php, or something else?) that can automatically populate some testing data in a fresh SQL databse so new developers have some data to test their work with.

13ruce1337 commented 10 years ago

yes this would be a PHP script that can be run if there is no database created. I'll run mysql_select_db('adventurer') and if it returns null, created the adventurer database.

13ruce1337 commented 10 years ago

welp after a bunch of research and programming, mysql_select_db() will be deprecated and eventually pulled from PHP. I have used PDO to create a script which makes a database with all the values if it doesn't exist. currently you have to visit the page to run the script. if the script is ran with the database already created, the script does nothing upon visit.