Jump to content

Error


Colourtheory

Recommended Posts

Sounds like the username is empty. You need to validate that to make sure it is a valid MySQL table identifier before trying to run the query. If you want to use user input as a MySQL identifier then you need to make sure it follows these rules: http://dev.mysql.com...dentifiers.html You also need to make sure they're not entering a username that is already the name of another table in the database. I don't recommend dynamically creating tables for each user.

Link to comment
Share on other sites

Have a table that holds all of your users, 1 record per user. If you have additional objects that are associated with users, have a table to store those also with a field that links them to whatever user they are associated with. If users can upload and "own" files, for example, then you would have a files table that stores the information about each file, with a user ID field that contains the ID of the user who owns that file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...