Simple Machines Community Forum

General Community => Scripting Help => Topic started by: Anguz on August 18, 2003, 01:19:39 PM

Title: MySQL query question
Post by: Anguz on August 18, 2003, 01:19:39 PM
this is the first time I actually try my luck with mysql, so forgive me if the question is silly  :(

if I want to change the avatar column in yabbse_members table, from tinytext to text, would this query be ok?

ALTER TABLE yabbse_members MODIFY avatar TEXT;
Title: Re:MySQL query question
Post by: Haase on August 18, 2003, 02:01:09 PM
Is there any reason you need to do this in script?  The easiest thing to do would be to go in via phpMyAdmin and change it that way.
Title: Re:MySQL query question
Post by: Anguz on August 18, 2003, 02:20:30 PM
well... I know

but this is for a mod I have almost complete, I need to give the query for others to do it too... maybe do a script to do it even, dunno

but I do need to be sure it's the correct query before using it in the mod :)
Title: Re:MySQL query question
Post by: Spaceman-Spiff on August 18, 2003, 03:03:11 PM
if you do it in phpmyadmin, it will tell you the SQL code too
Title: Re:MySQL query question
Post by: Anguz on August 18, 2003, 03:21:19 PM
great! I didn't know!!  :o

I did it and it gave me this query

ALTER TABLE `yabbse_members` CHANGE `avatar` `avatar` TEXT DEFAULT NULL

thx guys :)

I'll release the new mod a bit later today then ;D
Title: Re:MySQL query question
Post by: [Unknown] on August 18, 2003, 05:19:46 PM
Quote from: bostasp on August 18, 2003, 03:21:57 PM
phpMyAdmin: never fails

Wrong :P.

-[Unknown]
Title: Re:MySQL query question
Post by: [Unknown] on August 18, 2003, 05:49:49 PM
Quote from: bostasp on August 18, 2003, 05:22:56 PM
well, you can never argue with [Unknown]

Wrong :P.

-[Unknown]
Title: Re:MySQL query question
Post by: [Unknown] on August 18, 2003, 06:08:29 PM
Quote from: bostasp on August 18, 2003, 05:51:21 PM
im always wrong   :P

Wrong :P.

LOL.

-[Unknown]
Title: Re:MySQL query question
Post by: [Unknown] on August 18, 2003, 06:12:01 PM
Quote from: bostasp on August 18, 2003, 06:10:06 PM
LOL... this is getting silly  :D

Bingo!!!!  CORRECT!

-[Unknown]
Title: Re:MySQL query question
Post by: Anguz on August 18, 2003, 08:48:39 PM
yeah!!!

it's working!! :D I've done it!! 8)

I'll post it in Completed Mods in a few and will put a link here to the thread :)

but you can have a peek here ;)
http://llama.lewismedia.com/~anguz/forums/index.php?action=viewprofile;user=webmaster
Title: Re:MySQL query question
Post by: Anguz on August 18, 2003, 09:45:48 PM
here it is  :D

Built-in Avatar Randomizer (http://www.yabbse.org/community/index.php?board=158;action=display;threadid=25478&start=0)

thanks for your help guys :)
Title: Re:MySQL query question
Post by: Shoeb Omar on August 19, 2003, 01:23:11 PM
oooh cool mod :D
Title: Re:MySQL query question
Post by: Anguz on August 19, 2003, 01:48:39 PM
thx!

my members are starting to love it! since it makes it very easy for them to have the avatar script without having a server or knowing code, etc :)

if you have any comments on it, please post them in the mod's thread... I'd love to have some feedback :D