Forum Moderators: coopster
Basically I'm creating a database that just stores user accounts from the website. I will have to store the information on the server, and i was thinking that an associated array with the usernames as the key would do the trick. but i need the arrays to be stored when the session ends, so how would i save the data as a seperate file? what kind of file format would allow my php program to go back and read the data as an associated array?
I need to be able to go back into the file and alter it when i create more user accounts.
How should I implement this? Thank you so much for the help guys! My question may be a bit confusing, but i guess it's cuz i'm a noob =P Your help is appreciated!
There may be other ready-made solutions for PHP which don't require a database, but I'm not sure.
If right now all you need is a persistent hash, PHP can do that:
[us4.php.net ]
So now, it says
mysql> CREATE TABLE tableName
-> {
-> fieldName CHAR(15)
-> fieldName CHAR(15)
-> fieldName VARCHAR(16)
-> )
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '{
fieldName CHAR(15)
fieldName CHAR(15)
fieldName VARCHAR(16)
)
in the log. What can i do to change the "{"?
When writing complex queries, you can create them in a text editor (preferably one with SQL syntax coloring) and feed that input into MySQL at the command line like so:
mysql -u username -p < file.sql
-Or, you can paste it into your CLI, if yours allows it.
-Or, you can get a MySQL front end app to make your life easier.