SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Sep 2001
    Location
    St. Louis, MO
    Posts
    212
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Delete All Values in 1 Field

    Hi everyone.... been a long time but I'm hung up with a very elementary problem that I need help with.

    I have a table 'jos_comprofiler' that has a field named 'avatar'. This field contains the image name of each member's avatar for a membership site.

    I simply want to know the query I'd use to delete all the data in the field 'avatar'.

    This is a Community Builder Component database table for a joomla site. I'm doing a simultaneous migration and updating of the various extensions installed and the a lot of the old avatars are odd shaped and really look bad when resized into mini icons. I want to blow them away and have the members re upolad images with much stricter size limitations.

    Thanks for any help

  2. #2
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    4,903
    Mentioned
    93 Post(s)
    Tagged
    0 Thread(s)
    You could do an update query to set all entries in the avatar field to null
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  3. #3
    SitePoint Addict
    Join Date
    Sep 2001
    Location
    St. Louis, MO
    Posts
    212
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    You could do an update query to set all entries in the avatar field to null
    Hi, thanks for responding. I'm not sure what to use for the WHERE clause?

    Code:
    UPDATE jos_profiler SET avatar=NULL WHERE avatar !=NULL;
    ??

  4. #4
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    4,903
    Mentioned
    93 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Decoy1 View Post
    This is a Community Builder Component database table for a joomla site. I'm doing a simultaneous migration and updating of the various extensions installed and the a lot of the old avatars are odd shaped and really look bad when resized into mini icons. I want to blow them away and have the members re upolad images with much stricter size limitations.
    Quote Originally Posted by Decoy1 View Post
    Hi, thanks for responding. I'm not sure what to use for the WHERE clause?

    Code:
    UPDATE jos_profiler SET avatar=NULL WHERE avatar !=NULL;
    ??
    If your setting the avatar field to NULL for all users then you don't need the WHERE clause.
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  5. #5
    SitePoint Addict
    Join Date
    Sep 2001
    Location
    St. Louis, MO
    Posts
    212
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    If your setting the avatar field to NULL for all users then you don't need the WHERE clause.
    Of course, I just needed that push in the right direction... thanks bro


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •