I need an alternative for PHP data storage (simular to MySQL and SQLite DB's)
I'm working on a WordPress theme that includes a subscribe form which doesn't work correctly at the moment because i can't figure out where to store the user's info.
I cannot use MySQL because of the target market host's security. I cannot use SQLite because I cannot pre-install it into the theme and I'd like to make it as easy for the user as possible (already setup) so the last thing id want to ask them to do is setup a SQLite database.
I know there are other ways to store info, like in .txt files, but i 开发者_开发百科need something that will work like a database. Something that can update certain fields in certain rows etc etc.
Any ideas guys?
Thanks!
How are you planning to get WordPress running without MySQL? It's not like it will run on any random database — as stated on WordPress.org:
Currently, the only database supported by WordPress is MySQL version 4.1.2 or greater.
If you're wondering how to store information in the database WordPress is already using (which I assume must be MySQL), you should have a look at get_user_meta
, add_user_meta
, update_user_meta
and delete_user_meta
.
These functions will store additional information (meta data) alongside a user object within WordPress' database and you won't have to worry about the database at all. Just invoke the functions like any other PHP functions and you should be fine.
精彩评论