The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Quote:
I'm trying to run that query, but I get this error: Error SQL-query : [sql] ALTER TABLE user ADD yourfield TINYINT( 1 ) NOT NULL DEFAULT0 [/sql] MySQL said: 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 'DEFAULT0' at line 1 |
#12
|
||||
|
||||
You need a space between DEFAULT and 0.
And TINYINT( 1 ) should be TINYINT(1). |
#13
|
||||
|
||||
Yes, it's like that when I enter it in, but afterwards, it messes it up...
Anyway, I added in some quotes, and it worked. |
#15
|
||||
|
||||
nother question:
HOw would I add in a field to store large amounts of text (10,000 chars) ? With default 'None' ? I tried, but it just gave me syntax errors... EDIT: Also, once that was done, how would I set it up so that I could do $post['thatfield'] and have it show the poster's data for that field in the postbit? |
#16
|
||||
|
||||
Quote:
[sql]ALTER TABLE `tbl_name` ADD `col_name` TEXT;[/sql] For default, do you actually want the default to be the string: 'None' , or NULL (nothing there)? Answer #2: PHP Code:
|
#17
|
||||
|
||||
Umm, yeah, the string "none" I would replace TEXT with that?
Also, I want to be able to use $post[col_name] and have it display the info for $post[username]... get what I'm saying? |
#18
|
||||
|
||||
For the query, just use the one I gave, but replacing the tbl_name and col_name of course. TEXT means that it will contain text, to a maximum of 65535 characters.
Just like what I said at Answer #2; place the variable in the postbit wherever you want to display it. |
#19
|
||||
|
||||
but, wouldnt' that make the person who's viewing the post see their own info there, instead of the poster's?
|
#20
|
||||
|
||||
My mistake, it's $post[col_name].
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|