PHP Command That Converts a PGN File into a MySQL Script
Repository
https://github.com/programarivm/pgn-chess
PGN Chess for PHP is a simple, friendly, and powerful PGN (Portable Game Notation) library for running chess games from within PHP applications. It is a chess board representation that can be used in chess engines, chess applications and chess algorithms.
New Features
A command line interface (CLI) is created with the aim to convert PGN files into MySQL scripts. More specifically, Feature/pgntosql implements the following two commands.
Creates a MySQL PGN Chess database:
php cli/createdb.php
This will remove the current PGN Chess database and the data will be lost.
Do you want to proceed? (Y/N): y
Converts a PGN file into a MySQL INSERT statement:
php cli/pgntomysql.php example.pgn > example.sql
Note:
pgntomysql.phpworks okay with a syntactically valid PGN file as a precondition.
Roadmap
A command that checks the syntax of PGN files has to be created in another PR.
pgnsyntax.php
For further information visit section 4. Command Line Interface (CLI)
Would you help make this library better?
Contributions are welcome.
- Feel free to send a pull request
- Drop an email at [email protected] with the subject "PGN Chess Contributions"
- Leave me a comment on Twitter
- Say hello on Google+
Many thanks.

Thank you for the feedback.
Thank you for your review, @emrebeyler!
So far this week you've reviewed 4 contributions. Keep up the good work!
Hi @programarivm! We are @steem-ua, a new Steem dApp, computing UserAuthority for all accounts on Steem. We are currently in test modus upvoting quality Utopian-io contributions! Nice work!
Hi @steem-ua. Thank you, that sounds encouraging! Now I am writing the PGN syntax checker.
Hey @programarivm
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Congratulations @programarivm! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOPTo support your work, I also upvoted your post!
@programarivm, thank you for supporting @steemitboard as a witness.
Click on the badge to view your Board of Honor.
Once again, thanks for your support!
Do not miss the last post from @steemitboard:
SteemitBoard and the Veterans on Steemit - The First Community Badge.