The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chardef Export (PHP+MySQL)
Author Message
n1ghtwish
Apprentice
*

Posts: 40
Likes Given: 0
Likes Received: 28 in 8 posts
Joined: Jan 2016
Reputation: 0



Post: #2
RE: Chardef Export (PHP+MySQL)
Converting XuN and Ben's SQLite .add system to use MySQL table:

NOTICE: Don’t do this yet! I was too quick to post the script that I didn’t think to explain that we are only dealing with CHARDEFS here, so you should leave the .add script alone until we can get ITEMDEFS exported as well. I do have a PHP script for that in the works, it’s s just a little different because we have to handle dupelists.

If you know what you’re doing, you can use the PHP script for CHARDEFS and just get rid of the CHARDEF loop in the .add script. You’d still convert fully to MySQL but you’ll need to modify the ITEMDEF loop to insert to MySQL rather than SQLite, and then of course, everything should SELECT from MySQL, where the CHARDEFS table was populated by the PHP script and the ITEMDEF table by the .add Sphere script. Hope that makes sense.

Working with file "sphere_add_sqlite.scp":
1. Make sure "def.Item_DB" and "def.Char_DB" are set accordingly
2. Find "[function f_add_search]"
3. Replace all instances of "ldb" under that with "db"

That's it!

If you use my PHP script above, you won't really need all the build and setup functions.

You now have a PHP function to build your database with more data than you can get from within Sphere AND you have XuN and Ben's awesome .add function to read from it!
(This post was last modified: 02-02-2018 05:31 AM by n1ghtwish.)
01-31-2018 06:31 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 3 users Like n1ghtwish's post
Post Reply 


Messages In This Thread
Chardef Export (PHP+MySQL) - n1ghtwish - 01-31-2018, 04:30 AM
RE: Chardef Export (PHP+MySQL) - n1ghtwish - 01-31-2018 06:31 AM
RE: Chardef Export (PHP+MySQL) - alacanet - 10-27-2018, 12:47 PM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)