The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
For example I want to change the columns type to integer with an SQL like this: Code:
ALTER TABLE ro_userfield MODIFY field5 int(10) NOT NULL DEFAULT 10; Regards, Razvan M. |
#2
|
|||
|
|||
![]()
I would not advise to change the column types.
|
#3
|
|||
|
|||
![]()
What issues could I face if the fields would be set to be non-editable by users ?
|
#4
|
|||
|
|||
![]()
Parts of standard vBulletin coding may still assume a different column-type.
|
#5
|
||||
|
||||
![]()
Plus, there'd be no security issue for that you've changed the column type. You'll just face what Marco said.
|
#6
|
||||
|
||||
![]()
Why do you want to change it ?
|
#7
|
|||
|
|||
![]()
On my board, I am implementing right now a system of award points and it would be nice to be able to have those points on the user list. Obviously, the points are integers so I was thinking that I should ALTER the USERFIELD table to support integers. This would help because there will be no need to convert the data from string to integer when I will perform math operations in PHP.
But, after reading the replies above, I am starting to think that it is better to save the points as a string value and when it is necessary to convert the string to an integer. Some additional advantage would have been that it would be quite fast to find all the users with more than lets say 70 points. Maybe there are some MySql functions that allow me to convert a string to integer so that the whole operation will be performed on the MySql side. If that is true, then the only disadvantage remains speed. |
#8
|
||||
|
||||
![]()
Errrrrmm, converting a string to an integer is easy...There are even two ways to do it.
1./ Probably the best way. PHP Code:
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|