I've recently configued a download script of mine to integrate with invision board, my dl script uses usergroups like:
@1 = able to download files
@2 = able to post comments/ rate files
@3 = able to moderate comments
etc.
The problem I faced was, when I integrated it and inserted the new user_level field into the invision members table, all of the members that had already signed up won't have anything in the user_level field. There are over 800 members, so manually adding the @1@2 into the user_level field isn't really an option.
My idea, was when someone logs onto my site...I would use an update query that would "SET user_level=@1@2"...so by the time anyone logged in, they'd have the user_level field filled in.
But I get a
"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 '@2 WHERE id=''' at line 1"
message...I'm stumped, I didn't learn any php that I know from a book, or a class or anything, just from experience with other scripts.
It's obviously a problem with the @ sign, as I've tried other things just to test it, and it's worked. Is there another way of using the @ sign in php..like the way one uses apostrophes, perhaps?
If not, is there a way to create a field in a table with a default value that includes itself with all existing rows, and not just new rows after the field was created?
Thanks in advance.